-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStyles.xaml
More file actions
91 lines (84 loc) · 4.89 KB
/
Styles.xaml
File metadata and controls
91 lines (84 loc) · 4.89 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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ExpenseIt9">
<!-- Header text style -->
<Style x:Key="HeaderTextStyle">
<Setter Property="Label.VerticalAlignment" Value="Center"></Setter>
<Setter Property="Label.FontFamily" Value="Trebuchet MS"></Setter>
<Setter Property="Label.FontWeight" Value="Bold"></Setter>
<Setter Property="Label.FontSize" Value="18"></Setter>
<Setter Property="Label.Foreground" Value="#0066cc"></Setter>
<Style.Triggers>
<!-- When in high contrast modes, follow system colors to present proper contrast between adjacent colors. -->
<DataTrigger Binding="{Binding Path=(SystemParameters.HighContrast)}" Value="true">
<Setter Property="Label.Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Label.Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!-- Label style -->
<Style x:Key="LabelStyle" TargetType="{x:Type Label}">
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="0,0,0,5" />
<Style.Triggers>
<!-- When in high contrast modes, follow system colors to present proper contrast between adjacent colors. -->
<DataTrigger Binding="{Binding Path=(SystemParameters.HighContrast)}" Value="true">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!-- List header style -->
<Style x:Key="ListHeaderStyle" TargetType="{x:Type Border}">
<Setter Property="Height" Value="35" />
<Setter Property="Padding" Value="5" />
<Setter Property="Background" Value="#4E87D4" />
<Style.Triggers>
<!-- When in high contrast modes, follow system colors to present proper contrast between adjacent colors. -->
<DataTrigger Binding="{Binding Path=(SystemParameters.HighContrast)}" Value="true">
<Setter Property="Label.Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!-- DataGrid header style -->
<Style x:Key="ColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Height" Value="35" />
<Setter Property="Padding" Value="5" />
<Setter Property="Background" Value="#4E87D4" />
<Setter Property="Foreground" Value="White" />
<Style.Triggers>
<!--
When in high contrast modes, follow system colors to present proper contrast between adjacent colors.
Also add a border here to differentiate the header from the actual data as we no longer have a
disparate color.
-->
<DataTrigger Binding="{Binding Path=(SystemParameters.HighContrast)}" Value="true">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!-- List header text style -->
<Style x:Key="ListHeaderTextStyle" TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="White" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Style.Triggers>
<!-- When in high contrast modes, follow system colors to present proper contrast between adjacent colors. -->
<DataTrigger Binding="{Binding Path=(SystemParameters.HighContrast)}" Value="true">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!-- Button style -->
<Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Width" Value="125" />
<Setter Property="Height" Value="25" />
<Setter Property="Margin" Value="0,10,0,0" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
</ResourceDictionary>