forked from MahApps/MahApps.Metro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CleanWindowButtons.xaml
104 lines (96 loc) · 5.25 KB
/
CleanWindowButtons.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Buttons.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- light button style for min, max and close window buttons -->
<Style x:Key="MahApps.Styles.Button.CleanWindow.Light"
BasedOn="{StaticResource MahApps.Styles.Button.MetroWindow.Light}"
TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.SemiTransparentGray}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Accent}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.IdealForeground}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.IdealForegroundDisabled}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- dark button style for min, max and close window buttons -->
<Style x:Key="MahApps.Styles.Button.CleanWindow.Dark"
BasedOn="{StaticResource MahApps.Styles.Button.MetroWindow.Light}"
TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.SemiTransparentGray}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Accent}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.IdealForeground}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.DarkIdealForegroundDisabled}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- light button style for close window button (clean style) -->
<Style x:Key="MahApps.Styles.Button.CleanWindowClose.Light"
BasedOn="{StaticResource MahApps.Styles.Button.CleanWindow.Light}"
TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.CleanWindowCloseButton.Background}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Black}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.CleanWindowCloseButton.PressedBackground}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- dark button style for close window button (clean style) -->
<Style x:Key="MahApps.Styles.Button.CleanWindowClose.Dark"
BasedOn="{StaticResource MahApps.Styles.Button.CleanWindow.Dark}"
TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.CleanWindowCloseButton.Background}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.White}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.CleanWindowCloseButton.PressedBackground}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="MahApps.Styles.Button.CleanWindow.Close.Light.Win10"
BasedOn="{StaticResource MahApps.Styles.Button.CleanWindow.Light}"
TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#E81123" />
<Setter Property="Foreground" Value="White" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#F1707A" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="MahApps.Styles.Button.CleanWindow.Close.Dark.Win10"
BasedOn="{StaticResource MahApps.Styles.Button.CleanWindow.Dark}"
TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#E81123" />
<Setter Property="Foreground" Value="White" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#F1707A" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>