-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml
178 lines (162 loc) · 8.15 KB
/
App.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
<Application x:Class="HRM_Viewer.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:HRM_Viewer"
StartupUri="MainWindow.xaml">
<Application.Resources>
<SolidColorBrush x:Key="DarkSienna" Color="#36151E"/>
<SolidColorBrush x:Key="EnglishViolet" Color="#593F62"/>
<SolidColorBrush x:Key="Rhythm" Color="#7B6D8D"/>
<SolidColorBrush x:Key="ShadowBlue" Color="#8499B1"/>
<SolidColorBrush x:Key="PaleCerulean" Color="#A5C4D4"/>
<!-- Styles -->
<Style TargetType="Label">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Label">
<Grid>
<Rectangle Fill="Transparent" Margin="3"/>
<ContentPresenter HorizontalAlignment="Right" VerticalAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Header" TargetType="Label">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="DemiBold"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Label">
<Grid>
<Rectangle Fill="{StaticResource DarkSienna}" Height="30"/>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ErrorBox" TargetType="TextBox">
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Margin" Value="1"/>
<Setter Property="IsReadOnly" Value="True"/>
</Style>
<!-- Fajna rzecz do wyświetlania tekstu błędu-->
<!-- Placeholder for the TextBox itself
<ControlTemplate x:Key="ValidationErrorTemplate">
<StackPanel>
<AdornedElementPlaceholder />
<TextBlock Text="{Binding ErrorContent}"
Foreground="Red" />
</StackPanel>
</ControlTemplate>-->
<Style TargetType="TextBox">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="White"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Margin" Value="3"/>
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Validation.HasError" Value="True" />
<Condition Property="IsVisible" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="Red" />
<Setter Property="BorderThickness" Value="1.5"/>
</MultiTrigger>
<Trigger Property="Validation.HasError" Value="True">
<Setter Property="ToolTip"
Value="{Binding RelativeSource={x:Static RelativeSource.Self},
Path=(Validation.Errors)[0].ErrorContent}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="PasswordBox">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Margin" Value="3"/>
</Style>
<Style TargetType="Button">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Margin" Value="2"/>
<Setter Property="Background" Value="{StaticResource EnglishViolet}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Height" Value="Auto"/>
<Setter Property="MinHeight" Value="25"/>
<Setter Property="MinWidth" Value="50"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button" x:Name="button1CntrTemp">
<Border
Background="{TemplateBinding Background}">
<Grid>
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center" Name="defaultContent"
Margin="2"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="LightGray"/>
<Setter Property="Opacity" Value="0.3"/>
<Setter Property="Foreground" Value="Black"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource Rhythm}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Height" Value="23"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button" x:Key="ImageButton">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Margin" Value="2"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Height" Value="Auto"/>
<Setter Property="MinHeight" Value="25"/>
<Setter Property="MinWidth" Value="40"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button" x:Name="button1CntrTemp">
<Border
BorderThickness="0"
Background="{TemplateBinding Background}">
<Grid>
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center" Name="defaultContent"
Margin="2"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.3"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource EnglishViolet}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{StaticResource Rhythm}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Margin" Value="2"/>
</Style>
</Application.Resources>
</Application>