I am using Mahapps.MetroWindow ( http://mahapps.com/ ) to create the look of my applications, and right now I'm looking for the right way to customize the look of the X / Close button. By default, MetroWindow applies an individual style to all three teams. I would like either a match with Windows when the Close button was red or the mouse turned red.
What I found so far was that I can set the attribute WindowCloseButtonStylein a custom style. I did it like this:
<controls:MetroWindow x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
Title="MainWindow"
Height="350"
Width="525"
WindowCloseButtonStyle="{DynamicResource RedCloseWindowButtonStyle}">
...
In a separate XAML file, I have a style defined as
<Style x:Key="RedCloseWindowButtonStyle"
TargetType="{x:Type Button}"
BasedOn="{StaticResource MetroBaseWindowButtonStyle}">
<Setter Property="XXX"
Value="XXX" />
</Style>
, XXX . Windows, : ? ? , , ?