-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApp.xaml
More file actions
379 lines (358 loc) · 23.1 KB
/
Copy pathApp.xaml
File metadata and controls
379 lines (358 loc) · 23.1 KB
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<Application x:Class="NkxToolUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/Light.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Window">
<Setter Property="Background" Value="{DynamicResource WindowBrush}" />
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
</Style>
<Style TargetType="Border">
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style TargetType="GroupBox">
<Setter Property="Foreground" Value="{DynamicResource HeaderTextBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Background" Value="{DynamicResource PanelBrush}" />
<Setter Property="Padding" Value="12" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GroupBox">
<Grid SnapsToDevicePixels="True">
<Border Margin="0,10,0,0"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10" />
<Border Margin="12,0,12,0"
Padding="6,0"
Background="{DynamicResource PanelBrush}"
HorizontalAlignment="Left">
<ContentPresenter ContentSource="Header"
RecognizesAccessKey="True" />
</Border>
<ContentPresenter Margin="{TemplateBinding Padding}"
VerticalAlignment="Top"
Grid.Row="1" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextBox">
<Setter Property="Margin" Value="0,6,0,0" />
<Setter Property="Padding" Value="10,8" />
<Setter Property="MinHeight" Value="36" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="Background" Value="{DynamicResource PanelElevatedBrush}" />
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="CaretBrush" Value="{DynamicResource HeaderTextBrush}" />
<Setter Property="SelectionBrush" Value="{DynamicResource AccentBrush}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style TargetType="ComboBoxItem">
<Setter Property="Padding" Value="10,8" />
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="Background" Value="{DynamicResource PanelElevatedBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border x:Name="ItemBorder"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<ContentPresenter VerticalAlignment="Center"
HorizontalAlignment="Left" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="ItemBorder"
Property="Background"
Value="{DynamicResource AccentSubtleBrush}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="ItemBorder"
Property="Background"
Value="{DynamicResource AccentSubtleBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox">
<Setter Property="MinHeight" Value="36" />
<Setter Property="Padding" Value="10,6" />
<Setter Property="Background" Value="{DynamicResource PanelElevatedBrush}" />
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid SnapsToDevicePixels="True">
<ToggleButton x:Name="ToggleButton"
Focusable="False"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="ToggleBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="8">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="38" />
</Grid.ColumnDefinitions>
<ContentPresenter Margin="{TemplateBinding Padding}"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Content="{Binding SelectionBoxItem, RelativeSource={RelativeSource AncestorType=ComboBox}}"
ContentTemplate="{Binding SelectionBoxItemTemplate, RelativeSource={RelativeSource AncestorType=ComboBox}}"
ContentTemplateSelector="{Binding ItemTemplateSelector, RelativeSource={RelativeSource AncestorType=ComboBox}}" />
<Border Grid.Column="1"
BorderBrush="{DynamicResource BorderBrush}"
BorderThickness="1,0,0,0">
<Path Width="10"
Height="6"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{DynamicResource MutedTextBrush}"
Data="M 0 0 L 10 0 L 5 6 Z" />
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ToggleBorder"
Property="BorderBrush"
Value="{DynamicResource BorderStrongBrush}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="ToggleBorder"
Property="BorderBrush"
Value="{DynamicResource AccentBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<Popup x:Name="Popup"
AllowsTransparency="True"
IsOpen="{TemplateBinding IsDropDownOpen}"
Placement="Bottom"
PopupAnimation="Fade"
Focusable="False">
<Border Margin="0,4,0,0"
MinWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
Background="{DynamicResource PanelElevatedBrush}"
BorderBrush="{DynamicResource BorderStrongBrush}"
BorderThickness="1"
CornerRadius="8">
<ScrollViewer Margin="2"
SnapsToDevicePixels="True">
<ItemsPresenter />
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ListBox">
<Setter Property="Margin" Value="0,6,0,0" />
<Setter Property="Padding" Value="4" />
<Setter Property="Background" Value="{DynamicResource PanelElevatedBrush}" />
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="10,8" />
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border x:Name="ItemBorder"
Margin="0,2,0,2"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
CornerRadius="6"
SnapsToDevicePixels="True">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ItemBorder"
Property="Background"
Value="{DynamicResource AccentSubtleBrush}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="ItemBorder"
Property="Background"
Value="{DynamicResource AccentBrush}" />
<Setter Property="Foreground"
Value="{DynamicResource AccentForegroundBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground"
Value="{DynamicResource MutedTextBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<StackPanel Orientation="Horizontal">
<Border x:Name="CheckBorder"
Width="18"
Height="18"
Margin="0,0,9,0"
VerticalAlignment="Center"
Background="{DynamicResource PanelElevatedBrush}"
BorderBrush="{DynamicResource BorderStrongBrush}"
BorderThickness="1"
CornerRadius="4">
<Path x:Name="CheckMark"
Width="10"
Height="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 0 4 L 3 7 L 10 0"
Stroke="{DynamicResource AccentForegroundBrush}"
StrokeThickness="2"
Visibility="Collapsed" />
</Border>
<ContentPresenter VerticalAlignment="Center"
RecognizesAccessKey="True" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="CheckBorder"
Property="Background"
Value="{DynamicResource AccentBrush}" />
<Setter TargetName="CheckBorder"
Property="BorderBrush"
Value="{DynamicResource AccentBrush}" />
<Setter TargetName="CheckMark"
Property="Visibility"
Value="Visible" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="CheckBorder"
Property="BorderBrush"
Value="{DynamicResource AccentBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.50" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="16,14" />
<Setter Property="MinHeight" Value="56" />
<Setter Property="Background" Value="{DynamicResource PanelElevatedBrush}" />
<Setter Property="Foreground" Value="{DynamicResource BodyTextBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="ButtonBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="12"
SnapsToDevicePixels="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="8" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0"
Background="{DynamicResource AccentBrush}"
CornerRadius="12,0,0,12" />
<ContentPresenter Grid.Column="1"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ButtonBorder"
Property="Background"
Value="{DynamicResource AccentSubtleBrush}" />
<Setter TargetName="ButtonBorder"
Property="BorderBrush"
Value="{DynamicResource BorderStrongBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ButtonBorder"
Property="Background"
Value="{DynamicResource AccentBrush}" />
<Setter Property="Foreground"
Value="{DynamicResource AccentForegroundBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.55" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SecondaryButtonStyle"
TargetType="Button"
BasedOn="{StaticResource PrimaryButtonStyle}">
<Setter Property="Background" Value="{DynamicResource PanelBrush}" />
<Setter Property="Foreground" Value="{DynamicResource HeaderTextBrush}" />
</Style>
<Style x:Key="BigActionButtonStyle"
TargetType="Button"
BasedOn="{StaticResource SecondaryButtonStyle}">
<Setter Property="FontSize" Value="18" />
<Setter Property="MinHeight" Value="86" />
<Setter Property="Padding" Value="18,18" />
<Setter Property="Background" Value="{DynamicResource PanelBrush}" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>