Repository navigation
Expand file tree
/
Copy pathApp.xaml
More file actions
184 lines (172 loc) · 9.78 KB
/
Copy pathApp.xaml
File metadata and controls
184 lines (172 loc) · 9.78 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
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
<Application x:Class="OneNoteExporter.App"
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"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!-- ===== Converters ===== -->
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
<!-- ===== Colors ===== -->
<SolidColorBrush x:Key="PrimaryBlue" Color="#0078D7"/>
<SolidColorBrush x:Key="ButtonBlue" Color="#007BFF"/>
<SolidColorBrush x:Key="ButtonBlueHover" Color="#0056B3"/>
<SolidColorBrush x:Key="ButtonRed" Color="#DC3545"/>
<SolidColorBrush x:Key="ButtonRedHover" Color="#C82333"/>
<SolidColorBrush x:Key="ButtonGray" Color="#5A5A5A"/>
<SolidColorBrush x:Key="ButtonGrayHover" Color="#444444"/>
<SolidColorBrush x:Key="ButtonDisabled" Color="#CCCCCC"/>
<SolidColorBrush x:Key="BgPage" Color="#F5F5F5"/>
<SolidColorBrush x:Key="BgCard" Color="#FFFFFF"/>
<SolidColorBrush x:Key="BgList" Color="#F8F9FA"/>
<SolidColorBrush x:Key="BorderColor" Color="#DEE2E6"/>
<SolidColorBrush x:Key="BorderHover" Color="#007BFF"/>
<SolidColorBrush x:Key="TextPrimary" Color="#333333"/>
<SolidColorBrush x:Key="TextSecondary" Color="#666666"/>
<SolidColorBrush x:Key="SuccessBg" Color="#D4EDDA"/>
<SolidColorBrush x:Key="SuccessFg" Color="#155724"/>
<SolidColorBrush x:Key="SuccessBorder" Color="#C3E6CB"/>
<SolidColorBrush x:Key="WarningBg" Color="#FFF3CD"/>
<SolidColorBrush x:Key="WarningFg" Color="#856404"/>
<SolidColorBrush x:Key="WarningBorder" Color="#FFEEBA"/>
<SolidColorBrush x:Key="ErrorBg" Color="#F8D7DA"/>
<SolidColorBrush x:Key="ErrorFg" Color="#721C24"/>
<SolidColorBrush x:Key="ErrorBorder" Color="#F5C6CB"/>
<SolidColorBrush x:Key="InfoBg" Color="#D1ECF1"/>
<SolidColorBrush x:Key="InfoFg" Color="#0C5460"/>
<SolidColorBrush x:Key="InfoBorder" Color="#BEE5EB"/>
<!-- ===== Button Base ControlTemplates ===== -->
<!-- Flat: no border, solid fill (used by PrimaryButtonStyle etc.) -->
<ControlTemplate x:Key="FlatButtonTemplate" TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}"
CornerRadius="4"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
RecognizesAccessKey="True"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Opacity" Value="0.85"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Opacity" Value="0.7"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Background" Value="{StaticResource ButtonDisabled}"/>
<Setter Property="Cursor" Value="Arrow"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!-- Bordered: shows a 1px border (used by ExpandButtonStyle) -->
<ControlTemplate x:Key="BorderedButtonTemplate" TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="3"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
RecognizesAccessKey="True"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Opacity" Value="0.7"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!-- ===== Button Styles ===== -->
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{StaticResource ButtonBlue}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template" Value="{StaticResource FlatButtonTemplate}"/>
</Style>
<Style x:Key="DangerButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{StaticResource ButtonRed}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template" Value="{StaticResource FlatButtonTemplate}"/>
</Style>
<Style x:Key="GrayButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{StaticResource ButtonGray}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="10,6"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template" Value="{StaticResource FlatButtonTemplate}"/>
</Style>
<Style x:Key="SmallButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{StaticResource ButtonGray}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template" Value="{StaticResource FlatButtonTemplate}"/>
</Style>
<!-- Expand/collapse sections toggle button -->
<Style x:Key="ExpandButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{StaticResource TextSecondary}"/>
<Setter Property="Padding" Value="7,3"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template" Value="{StaticResource BorderedButtonTemplate}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#EEF4FF"/>
<Setter Property="BorderBrush" Value="{StaticResource PrimaryBlue}"/>
<Setter Property="Foreground" Value="{StaticResource PrimaryBlue}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ===== TextBox Style ===== -->
<Style TargetType="TextBox">
<Setter Property="Padding" Value="8,6"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="#F0F0F0"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource BorderHover}"/>
<Setter Property="Background" Value="White"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource BorderHover}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ===== ComboBox Style ===== -->
<Style TargetType="ComboBox">
<Setter Property="Padding" Value="8,6"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="White"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource BorderHover}"/>
</Trigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>