-
Notifications
You must be signed in to change notification settings - Fork 0
/
KinectResources.xaml
395 lines (375 loc) · 23.2 KB
/
KinectResources.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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Color x:Key="NormalBrandColor">#551a8b</Color>
<Color x:Key="HoverBrandColor">#442359</Color>
<Color x:Key="SecondaryBrandColor">#00BCF2</Color>
<Color x:Key="LightNeutralColor">#D2D2D2</Color>
<Color x:Key="MediumNeutralColor">#969696</Color>
<Color x:Key="DarkNeutralColor">#505050</Color>
<Color x:Key="HeaderForeground">White</Color>
<Color x:Key="LabelForeground">White</Color>
<Color x:Key="TitleForeground">#6e6e6e</Color>
<sys:Double x:Key="TitleFontSize">18.0</sys:Double>
<SolidColorBrush x:Key="NormalBrandBrush" Color="#52318F"/>
<SolidColorBrush x:Key="HoverBrandBrush" Color="#322350"/>
<SolidColorBrush x:Key="SecondaryBrandBrush" Color="#00BCF2"/>
<SolidColorBrush x:Key="LightNeutralBrush" Color="#D2D2D2"/>
<SolidColorBrush x:Key="MediumNeutralBrush" Color="#969696"/>
<SolidColorBrush x:Key="DarkNeutralBrush" Color="#505050"/>
<SolidColorBrush x:Key="HeaderForegroundBrush" Color="White"/>
<SolidColorBrush x:Key="LabelForegroundBrush" Color="White"/>
<SolidColorBrush x:Key="TitleForegroundBrush" Color="#6e6e6e"/>
<FontFamily x:Key="KinectFont">Segoe UI</FontFamily>
<sys:Double x:Key="HeaderFontSize">24.0</sys:Double>
<sys:Double x:Key="FPSFontSize">14.0</sys:Double>
<sys:Double x:Key="LabelFontSize">18.0</sys:Double>
<sys:Double x:Key="ItemFontSize">12.0</sys:Double>
<Style TargetType="{x:Type Image}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
<Style TargetType="{x:Type Label}" x:Key="KinectLabel">
<Style.Setters>
<Setter Property="Margin" Value="0 10 0 0"/>
<Setter Property="Padding" Value="0 3 0 3"/>
<Setter Property="Foreground" Value="{StaticResource LabelForegroundBrush}"/>
<Setter Property="FontFamily" Value="{StaticResource KinectFont}"/>
<Setter Property="FontSize" Value="{StaticResource LabelFontSize}"/>
</Style.Setters>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource MediumNeutralBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type TextBlock}" x:Key="KinectTextBlock">
<Style.Setters>
<Setter Property="Padding" Value="0 3 0 3"/>
<Setter Property="Foreground" Value="{StaticResource LabelForegroundBrush}"/>
<Setter Property="FontFamily" Value="{StaticResource KinectFont}"/>
<Setter Property="FontSize" Value="{StaticResource ItemFontSize}"/>
</Style.Setters>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource MediumNeutralBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type Button}" x:Key="KinectButton">
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="FontSize" Value="16" />
<Setter Property="SnapsToDevicePixels" Value="true" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="20,8,20,6" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Name="Root" BorderBrush="{StaticResource LabelForegroundBrush}" BorderThickness="0">
<Border.Background>
<SolidColorBrush x:Name="RootBackground" Color="{StaticResource NormalBrandColor}"/>
</Border.Background>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<ColorAnimation Storyboard.TargetName="RootBackground" Duration="0:0:0.1"
Storyboard.TargetProperty="Color"
To="{StaticResource NormalBrandColor}" />
</Storyboard>
</VisualState>
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimation Storyboard.TargetName="RootBackground" Duration="0:0:0.1"
Storyboard.TargetProperty="Color"
To="{StaticResource HoverBrandColor}" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ContentPresenter Margin="{TemplateBinding Padding}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True"
TextBlock.Foreground="{StaticResource LabelForegroundBrush}"
TextBlock.FontFamily="{StaticResource KinectFont}"
TextBlock.FontSize="{StaticResource ItemFontSize}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type RadioButton}" x:Key="KinectSettingsPanel">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="FontFamily" Value="{StaticResource KinectFont}"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Padding" Value="20,8,20,6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border Name="Root">
<Border.Background>
<SolidColorBrush x:Name="RootBackground" Color="{StaticResource MediumNeutralColor}"/>
</Border.Background>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver" />
<VisualState x:Name="Disabled" />
</VisualStateGroup>
<VisualStateGroup x:Name="CheckStates">
<VisualState x:Name="Checked">
<Storyboard>
<ColorAnimation Storyboard.TargetName="RootBackground"
Storyboard.TargetProperty="(SolidColorBrush.Color)"
To="{StaticResource NormalBrandColor}"
Duration="0:0:0.2"/>
<DoubleAnimation
FillBehavior="HoldEnd"
Storyboard.TargetName="ContentPresenterScaleTransform"
Storyboard.TargetProperty="ScaleY"
To="1"
Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked">
<Storyboard>
<ColorAnimation Storyboard.TargetName="RootBackground"
Storyboard.TargetProperty="(SolidColorBrush.Color)"
To="{StaticResource MediumNeutralColor}"
Duration="0:0:0.2"/>
<DoubleAnimation
FillBehavior="HoldEnd"
Storyboard.TargetName="ContentPresenterScaleTransform"
Storyboard.TargetProperty="ScaleY"
To="0"
Duration="0:0:0.2"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Indeterminate"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<StackPanel Orientation="Vertical">
<ToggleButton
Name="ToggleButton"
OverridesDefaultStyle="True"
Content="{TemplateBinding Tag}"
IsChecked="{Binding Path=IsChecked, Mode=TwoWay, RelativeSource={x:Static RelativeSource.TemplatedParent}}">
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="10 1 10 1">
<Border.Style>
<Style>
<Style.Setters>
<Setter Property="Border.Background" Value="Transparent"/>
</Style.Setters>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.TemplatedParent}, Path=IsMouseOver}" Value="True">
<Setter Property="Border.Background" Value="{StaticResource HoverBrandBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<ContentPresenter
RecognizesAccessKey="True"
Content="{TemplateBinding Content}"
TextBlock.Foreground="{DynamicResource LabelForegroundBrush}"
TextBlock.FontSize="{DynamicResource LabelFontSize}"/>
</Border>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<Grid>
<Border
Width="{Binding ElementName=ContentPresenter, Path=ActualWidth}"
Height="{Binding ElementName=ContentPresenter, Path=ActualHeight}">
<Border.LayoutTransform>
<ScaleTransform x:Name="ContentPresenterScaleTransform" ScaleY="0"/>
</Border.LayoutTransform>
</Border>
<Canvas ClipToBounds="True">
<Border Padding="10 0 10 2" Name="ContentPresenter" Canvas.Bottom="0">
<ContentPresenter ContentSource="Content"/>
</Border>
</Canvas>
</Grid>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--
<Style TargetType="{x:Type CheckBox}" x:Key="KinectCheckBox">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<ControlTemplate.Resources>
<Style TargetType="{x:Type Rectangle}">
<Style.Setters>
<Setter Property="Fill" Value="{StaticResource LabelForegroundBrush}"/>
<Setter Property="Stroke" Value="{StaticResource LabelForegroundBrush}"/>
</Style.Setters>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.TemplatedParent}, Path=IsEnabled}" Value="False">
<Setter Property="Fill" Value="{StaticResource MediumNeutralBrush}"/>
<Setter Property="Stroke" Value="{StaticResource MediumNeutralBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ControlTemplate.Resources>
<BulletDecorator Background="Transparent">
<BulletDecorator.Bullet>
<Canvas Width="15" Height="15">
<Rectangle Width="14" Height="14" Canvas.Left="1" Canvas.Top="1" StrokeThickness="1" Fill="{x:Null}"/>
<Rectangle Width="8" Height="8" Canvas.Left="4" Canvas.Top="4" Stroke="{x:Null}" Visibility="{Binding RelativeSource={x:Static RelativeSource.TemplatedParent}, Path=IsChecked, Converter={StaticResource BoolToVisibilityConverter}}"/>
</Canvas>
</BulletDecorator.Bullet>
<Label Name="BulletLabel" Style="{StaticResource KinectLabel}" Margin="2 0 0 0" FontSize="{StaticResource ItemFontSize}" Content="{TemplateBinding Content}"/>
</BulletDecorator>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ListBox" x:Key="KinectRadioList">
<Style.Setters>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="{x:Type ListBoxItem}">
<Style.Setters>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<ControlTemplate.Resources>
<Style TargetType="{x:Type Ellipse}">
<Style.Setters>
<Setter Property="Fill" Value="{StaticResource LabelForegroundBrush}"/>
<Setter Property="Stroke" Value="{StaticResource LabelForegroundBrush}"/>
</Style.Setters>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.TemplatedParent}, Path=IsEnabled}" Value="False">
<Setter Property="Fill" Value="{StaticResource MediumNeutralBrush}"/>
<Setter Property="Stroke" Value="{StaticResource MediumNeutralBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ControlTemplate.Resources>
<BulletDecorator Background="Transparent">
<BulletDecorator.Bullet>
<Canvas Width="15" Height="15">
<Ellipse Width="14" Height="14" Canvas.Left="1" Canvas.Top="1" StrokeThickness="1" Fill="{x:Null}"/>
<Ellipse Width="8" Height="8" Canvas.Left="4" Canvas.Top="4" Stroke="{x:Null}" Visibility="{Binding RelativeSource={x:Static RelativeSource.TemplatedParent}, Path=IsSelected, Converter={StaticResource BoolToVisibilityConverter}}"/>
</Canvas>
</BulletDecorator.Bullet>
<Label Name="BulletLabel" Style="{StaticResource KinectLabel}" Margin="2 0 0 0" FontSize="{StaticResource ItemFontSize}" Content="{Binding}"/>
</BulletDecorator>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border Background="Transparent">
<ScrollViewer Margin="0" Focusable="False">
<StackPanel Margin="2" IsItemsHost="True"/>
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
-->
<Style x:Key="SliderStyle" TargetType="{x:Type Slider}">
<Setter Property="Background" Value="{StaticResource NormalBrandBrush}"/>
<Setter Property="Height" Value="4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Slider}">
<ControlTemplate.Resources>
<Style TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Border Background="{TemplateBinding Background}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--SLIDER BAR PATH-->
<PathGeometry x:Key="Bar">
<PathFigure StartPoint="0,0">
<LineSegment Point="0,1"/>
<LineSegment Point="1,1"/>
<LineSegment Point="1,0"/>
<LineSegment Point="0,0"/>
</PathFigure>
</PathGeometry>
<!--BAR END-->
<!--TRIANGLE THUMB PATH-->
<PathGeometry x:Key="Triangle">
<PathFigure StartPoint="-1,1">
<LineSegment Point="0,0"/>
<LineSegment Point="1,1"/>
<LineSegment Point="-1,1"/>
</PathFigure>
</PathGeometry>
<!--TRIANGLE END-->
</ControlTemplate.Resources>
<Grid>
<Path
Data="{StaticResource Bar}"
Stretch="Fill"
Fill="{StaticResource MediumNeutralBrush}"
Stroke="Transparent"
StrokeThickness="0"/>
<Grid>
<Grid.OpacityMask>
<DrawingBrush>
<DrawingBrush.Drawing>
<GeometryDrawing Brush="{StaticResource MediumNeutralBrush}" Geometry="{StaticResource Bar}"/>
</DrawingBrush.Drawing>
</DrawingBrush>
</Grid.OpacityMask>
<Track Name="PART_Track" Value="{TemplateBinding Value}">
<Track.Thumb>
<Thumb Width="0" Background="{StaticResource SecondaryBrandBrush}" Foreground="{x:Null}">
<Thumb.Template>
<ControlTemplate TargetType="{x:Type Thumb}">
<Path
Data="{StaticResource Triangle}"
Stretch="Fill" Fill="{StaticResource SecondaryBrandBrush}"
Stroke="Transparent"
StrokeThickness="0"
Margin="-4,4,-4,-4"/>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
<Track.DecreaseRepeatButton>
<RepeatButton Background="{TemplateBinding Background}" Command="Slider.DecreaseLarge" IsEnabled="True" IsHitTestVisible="False"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Background="Transparent" Command="Slider.IncreaseLarge" IsEnabled="True" IsHitTestVisible="False"/>
</Track.IncreaseRepeatButton>
</Track>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>