-
Notifications
You must be signed in to change notification settings - Fork 1
/
Skins.xaml
413 lines (390 loc) · 19.2 KB
/
Skins.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
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--## Button ##-->
<LinearGradientBrush x:Key="ButtonBackground" StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="Silver" Offset="0" />
<GradientStop Color="#eeeeee" Offset="1" />
</LinearGradientBrush>
<Style TargetType="Button">
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="ClipToBounds" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Name="MainGrid" RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<ScaleTransform />
</Grid.RenderTransform>
<Rectangle Name="MainRectangle"
Grid.ColumnSpan="3" Grid.RowSpan="3"
Fill="{TemplateBinding Background}"
RadiusX="3" RadiusY="3" />
<Rectangle Name="rectangleWhiteBackground"
Grid.ColumnSpan="3" Grid.RowSpan="3"
Fill="#60ffffff"
RadiusX="3" RadiusY="3" />
<Rectangle Name="rectangleLeft" Width="20" HorizontalAlignment="Left"
RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush GradientOrigin="0,0.2" Center="0,0.2" RadiusX="0.3" RadiusY="1" Opacity="1">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="Transparent" Offset="1" />
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Name="rectangleTop" Height="20" VerticalAlignment="Top"
RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush GradientOrigin="0.4,0" Center="0.4,0" RadiusX="1.2" RadiusY="0.3" Opacity="0.9">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="Transparent" Offset="1" />
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Name="rectangleRight" Width="20" HorizontalAlignment="Right"
RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush GradientOrigin="1,0.65" Center="1,0.65" RadiusX="0.3" RadiusY="0.7" Opacity="0.8">
<GradientStop Color="#44222222" Offset="0" />
<GradientStop Color="Transparent" Offset="1" />
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Name="rectangleBottom" Height="20" VerticalAlignment="Bottom"
RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush GradientOrigin="0.5,1" Center="0.5,1" RadiusX="1.2" RadiusY="0.3" Opacity="0.8">
<GradientStop Color="#44222222" Offset="0" />
<GradientStop Color="Transparent" Offset="1" />
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Grid.ColumnSpan="3" Grid.RowSpan="3"
Stroke="{TemplateBinding BorderBrush}"
RadiusX="3" RadiusY="3" />
<ContentPresenter Margin="12,6,12,6" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter TargetName="rectangleWhiteBackground" Property="Fill" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="rectangleWhiteBackground" Property="Fill" Value="Transparent" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="rectangleTop" Property="Fill">
<Setter.Value>
<RadialGradientBrush GradientOrigin="0.4,0" Center="0.4,0" RadiusX="1.2" RadiusY="0.3" Opacity="0.9">
<GradientStop Color="#44222222" Offset="0" />
<GradientStop Color="Transparent" Offset="1" />
</RadialGradientBrush>
</Setter.Value>
</Setter>
<Setter TargetName="rectangleRight" Property="Fill" Value="Transparent" />
<Setter TargetName="rectangleBottom" Property="Fill" Value="Transparent" />
<Setter TargetName="rectangleLeft" Property="Fill">
<Setter.Value>
<RadialGradientBrush GradientOrigin="0,0.2" Center="0,0.2" RadiusX="0.3" RadiusY="1" Opacity="1">
<GradientStop Color="#44222222" Offset="0" />
<GradientStop Color="Transparent" Offset="1" />
</RadialGradientBrush>
</Setter.Value>
</Setter>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="MainGrid" Storyboard.TargetProperty="RenderTransform.ScaleX"
From="1" To="0.95" Duration="0:0:0.15" />
<DoubleAnimation Storyboard.TargetName="MainGrid" Storyboard.TargetProperty="RenderTransform.ScaleY"
From="1" To="0.95" Duration="0:0:0.15" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="MainGrid" Storyboard.TargetProperty="RenderTransform.ScaleX"
From="0.95" To="1" Duration="0:0:0.15" />
<DoubleAnimation Storyboard.TargetName="MainGrid" Storyboard.TargetProperty="RenderTransform.ScaleY"
From="0.95" To="1" Duration="0:0:0.15" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--## Item (base style for any ItemsControl item) ##-->
<Style x:Key="ItemStyle" TargetType="ContentControl">
<Setter Property="Background" >
<Setter.Value>
<LinearGradientBrush EndPoint="0,1">
<GradientStop Color="#FFFFFFFF" Offset="0" />
<GradientStop Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="#FF808080" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="DockPanel.Dock" Value="Top" />
<Setter Property="Margin" Value="0,1,0,1" />
<!--Setter Property="TextBox.TextAlignment" Value="Center" /-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContentControl">
<Grid>
<Rectangle Name="SelectedHighlight"
Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}"
RadiusX="2" RadiusY="2" Opacity="0" />
<Rectangle Name="HighlightCanvas"
Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}"
RadiusX="2" RadiusY="2" Opacity="0" />
<ContentPresenter Margin="4,3,4,3" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Selector.IsSelected" Value="True">
<Setter Property="Opacity" TargetName="SelectedHighlight" Value="1" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="0" To="1" Duration="0:0:0.15" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HighlightCanvas" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="1" To="0" Duration="0:0:0.15" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HighlightCanvas" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--## ComboBox ##-->
<Style TargetType="ComboBox">
<Setter Property="Background" Value="#FFFFFFFF" />
<Setter Property="BorderBrush" Value="#FF808080" />
<Setter Property="Padding" Value="10,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid Name="MainGrid">
<Popup Name="PART_Popup" AllowsTransparency="true" Placement="Bottom"
IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
<Grid Name="PopupCanvas" ClipToBounds="True" MaxHeight="{TemplateBinding MaxDropDownHeight}"
MinWidth="{Binding ElementName=MainGrid, Path=ActualWidth}">
<Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" Margin="0,-1,0,0" />
<ScrollViewer CanContentScroll="true">
<ItemsPresenter Margin="5" KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Cycle" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.IsSharedSizeScope="true" />
</ScrollViewer>
</Grid>
</Popup>
<Rectangle Name="Background"
Stroke="Transparent" Fill="{TemplateBinding Background}"
RadiusX="3" RadiusY="3" />
<ContentPresenter IsHitTestVisible="false" Margin="{TemplateBinding Padding}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid HorizontalAlignment="Right" Width="20">
<Rectangle Name="rectangleArrow" RadiusX="3" RadiusY="3" Fill="{TemplateBinding BorderBrush}" />
<Path Data="M0,0L3.5,4 7,0z" Fill="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Border Width="5" VerticalAlignment="Top"
BorderThickness="1,0,0,0" BorderBrush="{TemplateBinding BorderBrush}" />
</Grid>
<Rectangle Width="20" HorizontalAlignment="Left" RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush Center="0,0.2" RadiusX="0.3" RadiusY="1" GradientOrigin="0,0.2" Opacity="1">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#FFFFFFFF" Offset="0" />
<GradientStop Color="#00FFFFFF" Offset="1" />
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Height="20" VerticalAlignment="Top" RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush Center="0.4,0" RadiusX="1.2" RadiusY="0.3" GradientOrigin="0.4,0" Opacity="0.9">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#FFFFFFFF" Offset="0" />
<GradientStop Color="#00FFFFFF" Offset="1" />
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle HorizontalAlignment="Right" Width="20" RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush Center="1,0.65" RadiusX="0.3" RadiusY="0.7" GradientOrigin="1,0.65" Opacity="0.8">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#44222222" Offset="0" />
<GradientStop Color="#00FFFFFF" Offset="1" />
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle VerticalAlignment="Bottom" Height="20" RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<RadialGradientBrush Center="0.55,1" RadiusX="0.95" RadiusY="0.3" GradientOrigin="0.55,1" Opacity="0.8">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#44222222" Offset="0" />
<GradientStop Color="#00FFFFFF" Offset="1" />
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle RadiusX="3" RadiusY="3" Fill="#00FFFFFF"
Stroke="{TemplateBinding BorderBrush}"/>
<ToggleButton IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Background" Value="#00FFFFFF" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Rectangle Fill="Transparent" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
</ToggleButton>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" TargetName="rectangleArrow" Value="0.65" />
</Trigger>
<Trigger Property="HasItems" Value="False">
<Setter Property="MinHeight" TargetName="PopupCanvas" Value="100" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBoxItem" BasedOn="{StaticResource ItemStyle}" />
<!--## ListBox ##-->
<Style TargetType="ListBox">
<Setter Property="Background" Value="#FFFFFFFF" />
<Setter Property="BorderBrush" Value="#FF808080" />
<Setter Property="ClipToBounds" Value="True" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<DockPanel />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<Grid>
<Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}" />
<Rectangle Stroke="#00FFFFFF"
Height="8" VerticalAlignment="Top"
RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#00FFFFFF" Offset="0.85" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Stroke="#00FFFFFF"
Width="8" HorizontalAlignment="Left"
RadiusX="3" RadiusY="3">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#00FFFFFF" Offset="0.85" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Border>
<ItemsPresenter Margin="4" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource ItemStyle}" />
<!--## TextBox ##-->
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Padding" Value="4" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Grid>
<Rectangle Name="TextBoxBackground"
Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"
RadiusX="4" RadiusY="4" />
<Rectangle Name="TextBoxShadow"
Height="8" VerticalAlignment="Top"
Stroke="Transparent"
RadiusX="4" RadiusY="4">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#40000000" Offset="0" />
<GradientStop Color="Transparent" Offset="0.85" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Name="ShadowLeft"
Width="8" HorizontalAlignment="Left"
Stroke="Transparent"
RadiusX="4" RadiusY="4">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#40000000" Offset="0" />
<GradientStop Color="Transparent" Offset="0.85" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<ScrollViewer Name="PART_ContentHost" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--## ProgressBar ##-->
<Style TargetType="ProgressBar">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<Grid>
<Rectangle Name="PART_Track"
Stroke="DarkGray" StrokeThickness="2">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="DarkGray" Offset="0" />
<GradientStop Color="White" Offset="1" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Name="PART_Indicator"
HorizontalAlignment="Left" Margin="2">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="Blue" Offset="0" />
<GradientStop Color="Black" Offset="1" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>