-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml
259 lines (246 loc) · 18.3 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
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<?xml version="1.0" encoding="utf-8" ?>
<Application
x:Class="BehaviorAnimations.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BehaviorAnimations"
xmlns:media="using:Microsoft.UI.Xaml.Media">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!--#region [Fonts and Primitives]-->
<FontFamily x:Key="PrimaryFont">ms-appx:///Assets/Fonts/Aptos.ttf#Aptos</FontFamily>
<FontFamily x:Key="SecondaryFont">ms-appx:///Assets/Fonts/OdinRounded.ttf#Odin Rounded</FontFamily>
<x:Double x:Key="FontSizeHuge">32</x:Double>
<x:Double x:Key="FontSizeLarge">24</x:Double>
<x:Double x:Key="FontSizeMedium">16</x:Double>
<x:Double x:Key="FontSizeSmall">13</x:Double>
<x:Double x:Key="FontSizeTiny">9</x:Double>
<!--#endregion-->
<!--#region [Colors and Brushes]-->
<Color x:Key="LinearBorder1">#FF66BCFF</Color>
<Color x:Key="LinearBorder2">#FF4E91C4</Color>
<Color x:Key="LinearBorder3">#FF335F7F</Color>
<Color x:Key="LinearBorder4">#FF192E3D</Color>
<Color x:Key="LinearBorder5">#FFE0E0E0</Color>
<Color x:Key="LinearBorder6">#FFA0A0A0</Color>
<Color x:Key="LinearBorder7">#FF606060</Color>
<Color x:Key="LinearBorder8">#FF242424</Color>
<Color x:Key="AlphaShadow1">#FF242424</Color>
<Color x:Key="AlphaShadow2">#FF161616</Color>
<Color x:Key="AlphaShadow3">#FF090909</Color>
<Color x:Key="AlphaShadow4">#FF000000</Color>
<Color x:Key="GC1">#3F66BCFF</Color>
<Color x:Key="GC2">#3F4E91C4</Color>
<Color x:Key="GC3">#3F335F7F</Color>
<Color x:Key="GC4">#3F192E3D</Color>
<Color x:Key="BC1">#5000FF21</Color>
<Color x:Key="BC2">#504800FF</Color>
<Color x:Key="BC3">#50FFD800</Color>
<Color x:Key="BC4">#50FF6A00</Color>
<Color x:Key="BC5">#50FF00DC</Color>
<media:AcrylicBrush
x:Key="RevealBorderBrush"
FallbackColor="#317ad7"
TintColor="SpringGreen"
TintLuminosityOpacity="0.1"
TintOpacity="0.1" />
<Brush x:Key="PrimaryBrush">#96d9ff</Brush>
<Brush x:Key="SecondaryBrush">#469cdf</Brush>
<Brush x:Key="BackgroundBrush">#1a1a1a</Brush>
<Brush x:Key="HeaderBrush">#999999</Brush>
<Color x:Key="CloseButtonBrushPointerOver">#50FF2F05</Color>
<Color x:Key="CloseButtonBrushPointerPressed">#C0FF2F05</Color>
<SolidColorBrush
x:Key="BorderBrush"
Opacity="0.4"
Color="#8066BCFF" />
<LinearGradientBrush x:Key="GradientBorderBrush" StartPoint="0,0" EndPoint="1,1">
<GradientStop Offset="0.0" Color="{StaticResource LinearBorder1}" />
<GradientStop Offset="0.1" Color="{StaticResource LinearBorder2}" />
<GradientStop Offset="0.3" Color="{StaticResource LinearBorder3}" />
<GradientStop Offset="1.0" Color="{StaticResource LinearBorder4}" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="GradientHeaderBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="{StaticResource LinearBorder5}" />
<GradientStop Offset="0.25" Color="{StaticResource LinearBorder6}" />
<GradientStop Offset="0.75" Color="{StaticResource LinearBorder7}" />
<GradientStop Offset="1.0" Color="{StaticResource LinearBorder8}" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="GradientShadowBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="{StaticResource AlphaShadow1}" />
<GradientStop Offset="0.25" Color="{StaticResource AlphaShadow2}" />
<GradientStop Offset="0.75" Color="{StaticResource AlphaShadow3}" />
<GradientStop Offset="1.0" Color="{StaticResource AlphaShadow4}" />
</LinearGradientBrush>
<!--#endregion-->
<!--#region [Button Styler]-->
<Style x:Key="EnhancedButton" TargetType="Button">
<Setter Property="Foreground" Value="{ThemeResource PrimaryBrush}" />
<Setter Property="Background" Value="{ThemeResource BorderBrush}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="MinWidth" Value="100" />
<Setter Property="BorderBrush" Value="{ThemeResource AccentButtonBorderBrush}" />
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter
x:Name="ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw"
Background="{TemplateBinding Background}"
BackgroundSizing="{TemplateBinding BackgroundSizing}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
CornerRadius="{TemplateBinding CornerRadius}"
Foreground="{TemplateBinding Foreground}">
<ContentPresenter.BackgroundTransition>
<BrushTransition Duration="0:0:0.29" />
</ContentPresenter.BackgroundTransition>
<!-- [we can force a specific transition here]
<ContentPresenter.ContentTransitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</ContentPresenter.ContentTransitions>
-->
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<!-- MouseOver State -->
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonBackgroundPointerOver}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonBorderBrushPointerOver}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonForegroundPointerOver}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<!-- Pressed State -->
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonBackgroundPressed}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonBorderBrushPressed}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonForegroundPressed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<!-- Disabled State -->
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonBackgroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonBorderBrushDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AccentButtonForegroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->
<!--#region [Close Button Styler]-->
<Style x:Key="CloseButtonStyle" TargetType="Button">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
<Setter Property="FontSize" Value="20" />
<Setter Property="MinWidth" Value="32" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
<Setter Property="Width" Value="{ThemeResource TabViewItemHeaderCloseButtonWidth}" />
<Setter Property="Height" Value="{ThemeResource TabViewItemHeaderCloseButtonHeight}" />
<Setter Property="Background" Value="{ThemeResource TabViewItemHeaderCloseButtonBackground}" />
<Setter Property="Foreground" Value="{ThemeResource TabViewItemHeaderCloseButtonForeground}" />
<Setter Property="FocusVisualMargin" Value="-3" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter
x:Name="ContentPresenter"
Margin="0,0,0,0"
Padding="0,-5,0,0"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw"
Background="{TemplateBinding Background}"
BackgroundSizing="{TemplateBinding BackgroundSizing}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
CornerRadius="{TemplateBinding CornerRadius}">
<ContentPresenter.BackgroundTransition>
<BrushTransition Duration="0:0:0.2" />
</ContentPresenter.BackgroundTransition>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CloseButtonBrushPointerOver}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewItemHeaderCloseButtonForegroundPointerOver}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource CloseButtonBrushPointerPressed}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewItemHeaderCloseButtonForegroundPressed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewItemHeaderCloseButtonBackgroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewItemHeaderCloseButtonForegroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--#endregion-->
</ResourceDictionary>
</Application.Resources>
</Application>