-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.xaml
221 lines (199 loc) · 12.8 KB
/
App.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<Application x:Class="AdvancedWindowsAppearence.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:AdvancedWindowsAppearence"
xmlns:controls="clr-namespace:AdvancedWindowsAppearence.Controls"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;component/themes/aero2.normalcolor.xaml" />
</ResourceDictionary.MergedDictionaries>
<sys:Double x:Key="PreviewWidth">800</sys:Double>
<FontFamily x:Key="Segoe MDL2 Assets">./Fonts/segoe-mdl2-assets.ttf#Segoe MDL2 Assets</FontFamily>
<SolidColorBrush x:Key="ThemeColor"/>
<SolidColorBrush x:Key="ButtonFaceColor" Color="{DynamicResource {x:Static SystemColors.ControlColorKey}}"/>
<SolidColorBrush x:Key="BackgroundColor" Color="{DynamicResource {x:Static SystemColors.WindowColorKey}}"/>
<SolidColorBrush x:Key="BackgroundColorTabItems" Color="#BFFFFFFF"/>
<SolidColorBrush x:Key="ForegroundColor" Color="{DynamicResource {x:Static SystemColors.ControlTextColorKey}}"/>
<!--default label-->
<Style x:Key="SystemLabel" TargetType="Label">
<Setter Property="Foreground" Value="{DynamicResource ForegroundColor}"/>
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MenuFontTextDecorations}}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="3 5"/>
</Style>
<Style x:Key="SystemMenuLabel" TargetType="Label" BasedOn="{StaticResource SystemLabel}" >
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MenuFontFamily}}"/>
<Setter Property="Padding" Value="5 2"/>
</Style>
<Style x:Key="SystemButton" TargetType="Button" >
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundColor}"/>
<Setter Property="Background" Value="{DynamicResource ButtonFaceColor}"/>
<Setter Property="BorderBrush" Value="{x:Null}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinHeight" Value="35"/>
</Style>
<Style x:Key="SystemComboBox" TargetType="ComboBox">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}"/>
<Setter Property="Background" Value="{x:Null}"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="MinHeight" Value="30"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<!--button used for properties and settings-->
<Style x:Key="SystemSmallButton" TargetType="Button">
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundColor}"/>
<Setter Property="Background" Value="{DynamicResource ButtonFaceColor}"/>
<Setter Property="BorderBrush" Value="{x:Null}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinHeight" Value="35"/>
<Setter Property="Margin" Value="2"/>
</Style>
<Style x:Key="SystemSmallToggleButton" TargetType="ToggleButton" >
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundColor}"/>
<Setter Property="Background" Value="{DynamicResource ButtonFaceColor}"/>
<Setter Property="BorderBrush" Value="{x:Null}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinHeight" Value="35"/>
<Setter Property="Margin" Value="2"/>
<Setter Property="Padding" Value="0"/>
</Style>
<Style x:Key="CaptionButton" TargetType="controls:ClassicButton" >
<Setter Property="FontFamily" Value="Marlett"/>
<Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.SmallWindowCaptionButtonWidth}}"/>
<Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.SmallWindowCaptionButtonHeight}}"/>
<Setter Property="Margin" Value="0.5"/>
<Setter Property="FontStyle" Value="Normal"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
</Style>
<!--the main caption buttons-->
<Style x:Key="CaptionButtonWin10" TargetType="Button" >
<Setter Property="FontFamily" Value="{StaticResource Segoe MDL2 Assets}"/>
<Setter Property="FontSize" Value="10"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button" >
<Grid>
<Rectangle Name="Bg" Fill="{TemplateBinding Background}"/>
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Margin="18 6"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Gray"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CaptionButtonCloseWin10" BasedOn="{StaticResource CaptionButtonWin10}" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button" >
<Grid>
<Rectangle Name="Bg" Fill="{TemplateBinding Background}"/>
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Margin="18 6"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Red"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="IconTextBlockStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="{StaticResource Segoe MDL2 Assets}"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Margin" Value="0 0 5 0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="DefaultTabStyle" TargetType="TabItem">
<Setter Property="Foreground" Value="{DynamicResource ForegroundColor}"/>
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MenuFontSize}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<StackPanel Name="Panel" Height="48" VerticalAlignment="Stretch" Orientation="Horizontal" HorizontalAlignment="Stretch" MinWidth="320">
<Rectangle Name="SelRectangle" Width="5" Margin="0 12" HorizontalAlignment="Left"/>
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
ContentSource="Header"
Margin="10"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="SelRectangle" Property="Fill" Value="{DynamicResource ThemeColor}" />
</Trigger>
<Trigger Property="IsSelected" Value="False">
<Setter TargetName="SelRectangle" Property="Fill" Value="{x:Null}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True" SourceName="Panel">
<Setter TargetName="Panel" Property="Background" Value="#5FAAAAAA" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False" SourceName="Panel">
<Setter TargetName="Panel" Property="Background" Value="#02FFFFFF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="InfoText" TargetType="TextBlock" >
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.StatusFontSizeKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
<Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.StatusFontFamilyKey}}"/>
<Setter Property="Margin" Value="0 5 0 0"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="TextWrapping" Value="WrapWithOverflow"/>
</Style>
<Style x:Key="HypertextTextBlockStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource ThemeColor}"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Triggers>
<Trigger Property="IsMouseDirectlyOver" Value="True">
<Trigger.Setters>
<Setter Property="Foreground" Value="Gray"/>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Background" Value="#DDD"/>
<Setter Property="Foreground" Value="{DynamicResource ForegroundColor}"/>
<Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="Gray"/>
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>