-
Notifications
You must be signed in to change notification settings - Fork 0
/
Styles.xaml
533 lines (518 loc) · 30 KB
/
Styles.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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:BatteryMonitor"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Geometry x:Key="LightThemeIcon">F0M45,5 C45,2.23858 47.23858,0 50,0 C52.76142,0 55,2.23858 55,5 L55,15 C55,17.76142 52.76142,20 50,20 C47.23858,20 45,17.76142 45,15 L45,5 z M45,85 C45,82.23858 47.23858,80 50,80 C52.76142,80 55,82.23858 55,85 L55,95 C55,97.76142 52.76142,100 50,100 C47.23858,100 45,97.76142 45,95 L45,85 z M50,75 C36.19288,75 25,63.80712 25,50 C25,36.19288 36.19288,25 50,25 C63.80712,25 75,36.19288 75,50 C75,63.80712 63.80712,75 50,75 z M50,65 C58.28427,65 65,58.28427 65,50 C65,41.71573 58.28427,35 50,35 C41.71573,35 35,41.71573 35,50 C35,58.28427 41.71573,65 50,65 z M5,55 C2.23858,55 0,52.76142 0,50 C0,47.23858 2.23858,45 5,45 L15,45 C17.76142,45 20,47.23858 20,50 C20,52.76142 17.76142,55 15,55 L5,55 z M85,55 C82.23858,55 80,52.76142 80,50 C80,47.23858 82.23858,45 85,45 L95,45 C97.76142,45 100,47.23858 100,50 C100,52.76142 97.76142,55 95,55 L85,55 z M81.465,11.465 C83.42689,9.57014 86.54542,9.59724 88.47409,11.52591 C90.40276,13.45458 90.42986,16.57311 88.535,18.535 L80.63,26.44 C78.66811,28.33486 75.54958,28.30776 73.62091,26.37909 C71.69224,24.45042 71.66514,21.33189 73.56,19.37 L81.46,11.465 z M18.535,88.535 C17.27963,89.83478 15.42061,90.35606 13.67246,89.89849 C11.92432,89.44091 10.55909,88.07568 10.10151,86.32754 C9.64394,84.57939 10.16522,82.72037 11.465,81.465 L19.37,73.56 C20.62537,72.26022 22.48439,71.73894 24.23254,72.19651 C25.98068,72.65409 27.34591,74.01932 27.80349,75.76746 C28.26106,77.51561 27.73978,79.37463 26.44,80.63 L18.54,88.535 z M11.465,18.535 C9.57014,16.57311 9.59724,13.45458 11.52591,11.52591 C13.45458,9.59724 16.57311,9.57014 18.535,11.465 L26.44,19.37 C28.33486,21.33189 28.30776,24.45042 26.37909,26.37909 C24.45042,28.30776 21.33189,28.33486 19.37,26.44 L11.465,18.54 z M88.535,81.465 C90.42986,83.42689 90.40276,86.54542 88.47409,88.47409 C86.54542,90.40276 83.42689,90.42986 81.465,88.535 L73.56,80.63 C71.66514,78.66811 71.69224,75.54958 73.62091,73.62091 C75.54958,71.69224 78.66811,71.66514 80.63,73.56 L88.535,81.46 z</Geometry>
<Geometry x:Key="DarkThemeIcon">F0M82.5,74.375 C54.375,74.375 31.875,51.875 31.875,23.75 C31.875,15 33.75,6.875 37.5,0 C16.25,5.625 0,25.625 0,49.375 C0,77.5 22.5,100 50.625,100 C70,100 86.875,88.75 95.625,72.5 C91.875,73.75 87.5,74.375 82.5,74.375 z M50.625,93.75 C26.25,93.75 6.25,73.75 6.25,49.375 C6.25,33.75 14.375,20 26.875,11.875 C25.625,15.625 25.625,19.375 25.625,23.75 C25.625,55 51.25,80.625 82.5,81.25 C73.75,88.75 62.5,93.75 50.625,93.75 z</Geometry>
<Style x:Key="ThemeButtonStyle"
TargetType="{x:Type ToggleButton}">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="{StaticResource DescriptionBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate x:Name="ButtonTemplate"
TargetType="{x:Type ToggleButton}">
<Border Background="Transparent">
<Path x:Name="Icon"
Margin="{TemplateBinding Padding}"
Data="{StaticResource LightThemeIcon}"
Fill="{TemplateBinding Foreground}"
Stretch="Uniform" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Foreground" Value="{StaticResource DimmedForegroundBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Foreground" Value="{StaticResource SuperDimmedForegroundBrush}" />
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="Icon" Property="Data" Value="{StaticResource DarkThemeIcon}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextElement">
<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
</Style>
<Style x:Key="LabelStyle"
TargetType="Label">
<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
<Setter Property="Padding" Value="0" />
</Style>
<Style BasedOn="{StaticResource LabelStyle}"
TargetType="{x:Type Label}" />
<ControlTemplate x:Key="ExpanderToggleButton"
TargetType="{x:Type ToggleButton}">
<Border x:Name="Border"
Background="Transparent">
<Grid Margin="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="12" />
</Grid.ColumnDefinitions>
<Path Grid.Column="1"
Width="12"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5"
Stretch="Uniform"
Stroke="{StaticResource Group.ExpanderButtonBrush}"
StrokeThickness="1">
<Path.Data>
<PathGeometry FillRule="EvenOdd">
<PathFigure x:Name="P1"
IsClosed="False"
StartPoint="0,0">
<LineSegment x:Name="P2"
Point="8,8" />
<LineSegment x:Name="P3"
Point="16,0" />
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
<ContentPresenter Grid.Column="0" />
</Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver" />
<VisualState x:Name="Pressed" />
<VisualState x:Name="Disabled" />
</VisualStateGroup>
<VisualStateGroup x:Name="CheckStates">
<VisualState x:Name="Checked">
<Storyboard>
<PointAnimation Storyboard.TargetName="P1"
Storyboard.TargetProperty="StartPoint"
To="0,8"
Duration="0:0:0.3" />
<PointAnimation Storyboard.TargetName="P2"
Storyboard.TargetProperty="Point"
To="8,0"
Duration="0:0:0.3" />
<PointAnimation Storyboard.TargetName="P3"
Storyboard.TargetProperty="Point"
To="16,8"
Duration="0:0:0.3" />
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked">
<Storyboard>
<PointAnimation Storyboard.TargetName="P1"
Storyboard.TargetProperty="StartPoint"
To="0,0"
Duration="0:0:0.3" />
<PointAnimation Storyboard.TargetName="P2"
Storyboard.TargetProperty="Point"
To="8,8"
Duration="0:0:0.3" />
<PointAnimation Storyboard.TargetName="P3"
Storyboard.TargetProperty="Point"
To="16,0"
Duration="0:0:0.3" />
</Storyboard>
</VisualState>
<VisualState x:Name="Indeterminate">
<Storyboard>
<PointAnimation Storyboard.TargetName="P1"
Storyboard.TargetProperty="StartPoint"
To="0,4"
Duration="0:0:0.3" />
<PointAnimation Storyboard.TargetName="P2"
Storyboard.TargetProperty="Point"
To="8,4"
Duration="0:0:0.3" />
<PointAnimation Storyboard.TargetName="P3"
Storyboard.TargetProperty="Point"
To="16,4"
Duration="0:0:0.3" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Border>
</ControlTemplate>
<Style TargetType="{x:Type s:AnimatedExpander}">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type s:AnimatedExpander}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border x:Name="Border"
Grid.Row="0"
Background="{StaticResource Group.BackgroundBrush}"
BorderBrush="{StaticResource Group.BorderBrush}"
BorderThickness="1"
CornerRadius="5">
<Grid>
<ToggleButton Content="{TemplateBinding Header}"
FocusVisualStyle="{x:Null}"
IsChecked="{Binding IsExpanded,
Mode=TwoWay,
RelativeSource={RelativeSource TemplatedParent}}"
OverridesDefaultStyle="True"
Template="{StaticResource ExpanderToggleButton}" />
</Grid>
</Border>
<Border x:Name="Part_ExpandContainer"
Grid.Row="1"
ClipToBounds="True">
<Border x:Name="Part_ExpandSite"
Grid.Row="1"
Height="NaN"
Background="{StaticResource Group.BackgroundBrush}"
BorderBrush="{StaticResource Group.BorderBrush}"
BorderThickness="1,0,1,1"
CornerRadius="0,0,5,5"
Visibility="Collapsed">
<Border.RenderTransform>
<TranslateTransform x:Name="Part_Transform" X="0" Y="0" />
</Border.RenderTransform>
<ContentPresenter Margin="4" />
</Border>
</Border>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver" />
<VisualState x:Name="Disabled" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="True">
<Setter TargetName="Border" Property="CornerRadius" Value="5,5,0,0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="VerticalScrollBarThumb"
TargetType="{x:Type Thumb}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Background="Transparent">
<Border Width="3"
Margin="0,3,0,3"
HorizontalAlignment="Center"
Background="{StaticResource ScrollbarThumbBrush}"
CornerRadius="3" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HorizontalScrollBarThumb"
TargetType="{x:Type Thumb}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Background="Transparent">
<Border Height="6"
Margin="3,0,3,0"
VerticalAlignment="Center"
Background="{StaticResource ScrollbarThumbBrush}"
CornerRadius="3" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollBarPageButton"
TargetType="{x:Type RepeatButton}">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Focusable" Value="false" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Rectangle Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Fill="{TemplateBinding Background}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type ScrollBar}"
TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="Stylus.IsFlicksEnabled" Value="false" />
<Setter Property="Foreground" Value="{x:Static SystemColors.ControlTextBrush}" />
<Setter Property="Width" Value="10" />
<Setter Property="MinWidth" Value="3" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid Name="Bg"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="true">
<Track Name="PART_Track"
IsDirectionReversed="true"
IsEnabled="{TemplateBinding IsMouseOver}">
<Track.Resources>
<sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">
60
</sys:Double>
</Track.Resources>
<Track.DecreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageUpCommand}"
Style="{StaticResource ScrollBarPageButton}" />
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageDownCommand}"
Style="{StaticResource ScrollBarPageButton}" />
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource VerticalScrollBarThumb}" />
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Width" Value="Auto" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Height" Value="2" />
<Setter Property="MinHeight" Value="2" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid Name="Bg"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="true">
<Track Name="PART_Track"
IsEnabled="{TemplateBinding IsMouseOver}">
<Track.Resources>
<sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}">
60
</sys:Double>
</Track.Resources>
<Track.DecreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}"
Style="{StaticResource ScrollBarPageButton}" />
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Command="{x:Static ScrollBar.PageRightCommand}"
Style="{StaticResource ScrollBarPageButton}" />
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource HorizontalScrollBarThumb}" />
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type ScrollViewer}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid x:Name="Grid"
Background="{TemplateBinding Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle x:Name="Corner"
Grid.Row="1"
Grid.Column="1"
Fill="{TemplateBinding Background}" />
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
Grid.Row="0"
Grid.Column="0"
Margin="{TemplateBinding Padding}"
CanContentScroll="{TemplateBinding CanContentScroll}"
CanHorizontallyScroll="False"
CanVerticallyScroll="False"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<ScrollBar x:Name="PART_VerticalScrollBar"
Grid.Row="0"
Grid.Column="1"
AutomationProperties.AutomationId="VerticalScrollBar"
Cursor="Arrow"
Maximum="{TemplateBinding ScrollableHeight}"
Minimum="0"
Orientation="Vertical"
ViewportSize="{TemplateBinding ViewportHeight}"
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
Value="{Binding VerticalOffset,
Mode=OneWay,
RelativeSource={RelativeSource TemplatedParent}}" />
<ScrollBar x:Name="PART_HorizontalScrollBar"
Grid.Row="1"
Grid.Column="0"
AutomationProperties.AutomationId="HorizontalScrollBar"
Cursor="Arrow"
Maximum="{TemplateBinding ScrollableWidth}"
Minimum="0"
Orientation="Horizontal"
ViewportSize="{TemplateBinding ViewportWidth}"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
Value="{Binding HorizontalOffset,
Mode=OneWay,
RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DescriptionStyle"
BasedOn="{StaticResource LabelStyle}"
TargetType="{x:Type Label}">
<Setter Property="Margin" Value="0,0,10,0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{StaticResource DescriptionBrush}" />
</Style>
<Style x:Key="ValueStyle"
BasedOn="{StaticResource LabelStyle}"
TargetType="{x:Type Label}">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Height" Value="21" />
<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
</Style>
<Style TargetType="{x:Type s:LabelValuePair}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,0,8" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type s:LabelValuePair}">
<Grid Width="Auto"
HorizontalAlignment="Left"
VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"
SharedSizeGroup="ColumnGroupLabel" />
<ColumnDefinition Width="10" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel>
<Label Grid.Column="0"
Content="{TemplateBinding Label}"
Style="{DynamicResource DescriptionStyle}" />
<Grid Grid.Column="1">
<StackPanel x:Name="NoneEmpty"
Orientation="Horizontal">
<Label Content="{TemplateBinding Value}"
Style="{DynamicResource ValueStyle}" />
<Label Content="{TemplateBinding Unit}"
Style="{DynamicResource ValueStyle}" />
</StackPanel>
<Label x:Name="Empty"
Content="--"
Style="{DynamicResource ValueStyle}"
Visibility="Collapsed" />
</Grid>
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Value" Value="">
<Setter TargetName="NoneEmpty" Property="Visibility" Value="{x:Static Visibility.Collapsed}" />
<Setter TargetName="Empty" Property="Visibility" Value="{x:Static Visibility.Visible}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PercentValueStyle"
TargetType="{x:Type s:ValueControl}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type s:ValueControl}">
<StackPanel Orientation="Horizontal">
<Label x:Name="NoneEmptyValue"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Content="{TemplateBinding Value}"
FontSize="34" />
<Label x:Name="Unit"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Content="%"
FontSize="34" />
<Label x:Name="Empty"
Margin="0,-2,0,0"
Content="--"
FontSize="22"
Visibility="Collapsed" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="Value" Value="">
<Setter TargetName="NoneEmptyValue" Property="Visibility" Value="{x:Static Visibility.Collapsed}" />
<Setter TargetName="Unit" Property="Visibility" Value="{x:Static Visibility.Collapsed}" />
<Setter TargetName="Empty" Property="Visibility" Value="{x:Static Visibility.Visible}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="RemainingTimeValueStyle"
TargetType="{x:Type s:LabelValuePair}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type s:LabelValuePair}">
<StackPanel Orientation="Horizontal">
<Label Grid.Column="0"
Content="{TemplateBinding Label}"
Style="{DynamicResource DescriptionStyle}" />
<Label x:Name="NoneEmptyValue"
Content="{TemplateBinding Value}"
Style="{DynamicResource ValueStyle}" />
<Label x:Name="Empty"
Content="--"
Style="{DynamicResource ValueStyle}"
Visibility="Collapsed" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="Value" Value="">
<Setter TargetName="NoneEmptyValue" Property="Visibility" Value="{x:Static Visibility.Collapsed}" />
<Setter TargetName="Empty" Property="Visibility" Value="{x:Static Visibility.Visible}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>