MahApps.Metro icon indicating copy to clipboard operation
MahApps.Metro copied to clipboard

How to change foreground color of minimize, maximize, and close buttons?

Open Cyral opened this issue 12 years ago • 2 comments

I've spent far to long attempting to do this, and can't find a solution. I need to change the foreground color of the title buttons in order to match a custom title theme, as they are currently hard to see with a different background.

Cyral avatar Oct 19 '14 21:10 Cyral

You can create your own style for MetroWindow. The original can be found in /Themes/MetroWindow.xaml, and set the foreground color of <Controls:WindowButtonCommands x:Name="PART_WindowButtonCommands" to whatever you want.

Dotnetifier avatar Oct 20 '14 15:10 Dotnetifier

@Cyral with the latest alpha version, you can create your own style for all 3 buttons (and set it to the properties of the MetroWindow -> WindowMinButtonStyle, WindowMaxButtonStyle, WindowCloseButtonStyle)

    <Style x:Key="YourCustomMetroWindowButtonStyle"
           TargetType="{x:Type Button}"
           BasedOn="{StaticResource MetroWindowButtonStyle}">
        <Setter Property="Foreground"
                Value="WhatEverYouWant" />
    </Style>

punker76 avatar Dec 01 '14 10:12 punker76