-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml
More file actions
229 lines (213 loc) · 12.9 KB
/
Copy pathApp.xaml
File metadata and controls
229 lines (213 loc) · 12.9 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
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
<Application x:Class="WechatBot.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="AppMainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<!-- ==================== 全局字体 ==================== -->
<FontFamily x:Key="GlobalFont">Microsoft YaHei UI, Segoe UI, sans-serif</FontFamily>
<FontFamily x:Key="MonoFont">Cascadia Code, Consolas, Courier New</FontFamily>
<!-- ==================== 动画缓动函数 ==================== -->
<CubicEase x:Key="EaseOut" EasingMode="EaseOut"/>
<QuadraticEase x:Key="EaseInOut" EasingMode="EaseInOut"/>
<BackEase x:Key="EaseOutBack" EasingMode="EaseOut"/>
<!-- ==================== 全局 ScrollBar 美化 ==================== -->
<Style TargetType="ScrollViewer">
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
</Style>
<Style TargetType="ScrollBar">
<Setter Property="Width" Value="5"/>
<Setter Property="Background" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Width" Value="8"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ==================== 导航项样式 ==================== -->
<Style x:Key="NavItemStyle" TargetType="RadioButton">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource TextTertiaryBrush}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Padding" Value="16,11"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="GroupName" Value="Nav"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="Bg" Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}" CornerRadius="8"
Margin="8,2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="Indicator" Grid.Column="0" Width="3" Height="16"
Background="{DynamicResource AccentBrush}"
CornerRadius="1.5" Margin="0,0,12,0"
VerticalAlignment="Center" Opacity="0"/>
<ContentPresenter Grid.Column="1" HorizontalAlignment="Left"
VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bg" Property="Background"
Value="{DynamicResource NavItemHoverBrush}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Bg" Property="Background"
Value="{DynamicResource AccentDimBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter TargetName="Indicator" Property="Opacity" Value="1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ==================== 快捷操作卡片 ==================== -->
<Style x:Key="ActionCard" TargetType="Border">
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="20,18"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource SurfaceBorderBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ==================== 步骤卡片 ==================== -->
<Style x:Key="StepCard" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource SurfaceBrush}"/>
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="16,14"/>
<Setter Property="BorderThickness" Value="3,0,0,0"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource CardHoverBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- ==================== 空状态 ==================== -->
<Style x:Key="EmptyState" TargetType="StackPanel">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Opacity" Value="0.4"/>
</Style>
<!-- ==================== 设置分组卡片 ==================== -->
<Style x:Key="SettingsCard" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource CardBrush}"/>
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="20,18"/>
<Setter Property="Margin" Value="0,0,0,12"/>
</Style>
<!-- ==================== 设置标签 ==================== -->
<Style x:Key="SettingLabel" TargetType="TextBlock">
<Setter Property="FontSize" Value="12"/>
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!-- ==================== 设置数值 ==================== -->
<Style x:Key="SettingValue" TargetType="TextBlock">
<Setter Property="FontSize" Value="13"/>
<Setter Property="Foreground" Value="{DynamicResource InfoBrush}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<!-- ==================== 主按钮 ==================== -->
<Style x:Key="PrimaryButton" TargetType="Button">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="{DynamicResource AccentBrush}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="20,10"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
CornerRadius="8" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource AccentHoverBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Opacity" Value="0.85"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ==================== 次要按钮 ==================== -->
<Style x:Key="SecondaryButton" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
<Setter Property="Background" Value="{DynamicResource SurfaceBrush}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="20,10"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{DynamicResource SeparatorBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
CornerRadius="8" Padding="{TemplateBinding Padding}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource SurfaceHoverBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ==================== 危险按钮 ==================== -->
<Style x:Key="DangerButton" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource DangerBrush}"/>
<Setter Property="Background" Value="{DynamicResource DangerDimBrush}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="20,10"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
CornerRadius="8" Padding="{TemplateBinding Padding}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource DangerBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ==================== 标签样式 ==================== -->
<Style x:Key="TagStyle" TargetType="Border">
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Padding" Value="8,3"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>