-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommonResources.xaml
170 lines (160 loc) · 9.21 KB
/
CommonResources.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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Стили кнопок с анимациями -->
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Margin" Value="10,6,0,6"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="Padding" Value="15,8"/>
<Setter Property="Background" Value="#0E639C"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#0E639C"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<!-- Анимация при наведении мыши -->
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#1177BB"/>
<Setter Property="BorderBrush" Value="#1177BB"/>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
From="1.0" To="1.05" Duration="0:0:0.1"/>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
From="1.0" To="1.05" Duration="0:0:0.1"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
From="1.05" To="1.0" Duration="0:0:0.1"/>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
From="1.05" To="1.0" Duration="0:0:0.1"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<!-- Анимация при нажатии -->
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#0D5689"/>
<Setter Property="BorderBrush" Value="#0D5689"/>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
From="1.05" To="0.95" Duration="0:0:0.05"/>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
From="1.05" To="0.95" Duration="0:0:0.05"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
From="0.95" To="1.0" Duration="0:0:0.05"/>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
From="0.95" To="1.0" Duration="0:0:0.05"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<!-- Стиль для неактивной кнопки -->
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#4D4D4D"/>
<Setter Property="BorderBrush" Value="#4D4D4D"/>
<Setter Property="Foreground" Value="#A0A0A0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="1"/>
</Setter.Value>
</Setter>
</Style>
<!-- Стиль для DataGrid -->
<Style TargetType="DataGrid">
<Setter Property="Background" Value="#1E1E1E"/>
<Setter Property="Foreground" Value="#D4D4D4"/>
<Setter Property="BorderBrush" Value="#3F3F46"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="RowBackground" Value="#2D2D30"/>
<Setter Property="AlternatingRowBackground" Value="#252526"/>
<Setter Property="HorizontalGridLinesBrush" Value="#3F3F46"/>
<Setter Property="VerticalGridLinesBrush" Value="#3F3F46"/>
<Setter Property="HeadersVisibility" Value="Column"/>
<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#007ACC"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="BorderBrush" Value="#3F3F46"/>
<Setter Property="BorderThickness" Value="0,0,1,0"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DataGridColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#007ACC"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="BorderBrush" Value="#3F3F46"/>
<Setter Property="BorderThickness" Value="0,0,1,0"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="LabelStyle" TargetType="Label">
<Setter Property="Foreground" Value="#D4D4D4"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="TextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="#2D2D30"/>
<Setter Property="Foreground" Value="#D4D4D4"/>
<Setter Property="BorderBrush" Value="#3F3F46"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="FontSize" Value="14"/>
</Style>
<Style TargetType="ProgressBar">
<Setter Property="Height" Value="20"/>
<Setter Property="Foreground" Value="#0E639C"/>
<Setter Property="Background" Value="#2D2D30"/>
<Setter Property="BorderBrush" Value="#3F3F46"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<!-- Стиль для текстовых блоков -->
<Style x:Key="TextBlockStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="#FFFFFF"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<!-- Стиль для CheckBox -->
<Style x:Key="CustomCheckBoxStyle" TargetType="CheckBox">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Margin" Value="5"/>
</Style>
</ResourceDictionary>