-
-
Notifications
You must be signed in to change notification settings - Fork 310
Expand file tree
/
Copy pathHeaderCarousel.xaml
More file actions
290 lines (278 loc) · 16.4 KB
/
HeaderCarousel.xaml
File metadata and controls
290 lines (278 loc) · 16.4 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
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<?xml version="1.0" encoding="utf-8" ?>
<UserControl
x:Class="AppControlManager.CustomUIElements.HomePageCarousel.HeaderCarousel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:AppControlManager.CustomUIElements.HomePageCarousel"
xmlns:common="using:CommonCore.ToolKits"
Loaded="{x:Bind UserControl_Loaded}"
Unloaded="{x:Bind UserControl_Unloaded}">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<RadialGradientBrush x:Key="OverlayRadialGradient" Center="0.5,0.22" GradientOrigin="0.5,0" MappingMode="RelativeToBoundingBox" RadiusX="0.92" RadiusY="0.8200000000000001" SpreadMethod="Pad">
<GradientStop Offset="0" Color="#FFFFFFFF" />
<GradientStop Offset="0.05" Color="#FFFFFFFF" />
<GradientStop Offset="0.35" Color="#FFFFFFFF" />
<GradientStop Offset="0.55" Color="#FFFFFFFF" />
<GradientStop Offset="0.95" Color="#00FFFFFF" />
<GradientStop Offset="1" Color="#00FFFFFF" />
</RadialGradientBrush>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<RadialGradientBrush x:Key="OverlayRadialGradient" Center="0.5,0.22" GradientOrigin="0.5,0.0" MappingMode="RelativeToBoundingBox" RadiusX="0.92" RadiusY="0.8200000000000001" SpreadMethod="Pad">
<GradientStop Offset="0" Color="#FF000000" />
<GradientStop Offset="0.05" Color="#FF000000" />
<GradientStop Offset="0.35" Color="#FF000000" />
<GradientStop Offset="0.55" Color="#FF000000" />
<GradientStop Offset="0.85" Color="#00000000" />
<GradientStop Offset="0.95" Color="#00000000" />
<GradientStop Offset="1" Color="#00000000" />
</RadialGradientBrush>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<RadialGradientBrush x:Key="OverlayRadialGradient" Center="0.5,0.22" GradientOrigin="0.5,0" MappingMode="RelativeToBoundingBox" RadiusX="0.92" RadiusY="0.8200000000000001" SpreadMethod="Pad">
<GradientStop Offset="0" Color="#FF000000" />
<GradientStop Offset="0.05" Color="#FF000000" />
<GradientStop Offset="0.35" Color="#FF000000" />
<GradientStop Offset="0.55" Color="#FF000000" />
<GradientStop Offset="0.95" Color="#00000000" />
<GradientStop Offset="1" Color="#00000000" />
</RadialGradientBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<!-- Title text gradient options -->
<LinearGradientBrush x:Key="LightTextGradient" StartPoint="0,0" EndPoint="1,1">
<GradientStop Offset="0.1" Color="#FFFFFF" />
<GradientStop Offset="0.3" Color="#E9E9E9" />
<GradientStop Offset="0.6" Color="#FDFDFD" />
<GradientStop Offset="0.9" Color="#FFFFFF" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="DarkTextGradient" StartPoint="0,0" EndPoint="1,1">
<GradientStop Offset="0.1" Color="#303030" />
<GradientStop Offset="0.3" Color="#4A4A4A" />
<GradientStop Offset="0.6" Color="#161515" />
<GradientStop Offset="0.9" Color="#303030" />
</LinearGradientBrush>
<!-- Glitch jitter for the header title (single-run, triggered by a timer in code-behind).
Note: Also toggles overlay text opacity so there is NO tint when idle. -->
<Storyboard x:Key="CarouselGlitchStoryboard" RepeatBehavior="1x">
<!-- Cyan channel shift -->
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CarouselCyanShift" Storyboard.TargetProperty="X" Duration="0:0:0.7">
<LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.10" Value="3"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.18" Value="-2"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.30" Value="10"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.34" Value="-1"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.50" Value="4"/>
<LinearDoubleKeyFrame KeyTime="0:0:0.70" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CarouselCyanShift" Storyboard.TargetProperty="Y" Duration="0:0:0.7">
<LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.18" Value="-1"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.30" Value="2"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.50" Value="-1"/>
<LinearDoubleKeyFrame KeyTime="0:0:0.70" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<!-- Magenta channel shift -->
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CarouselMagentaShift" Storyboard.TargetProperty="X" Duration="0:0:0.7">
<LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.12" Value="-4"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.22" Value="2"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.38" Value="-11"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.46" Value="1"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.58" Value="-3"/>
<LinearDoubleKeyFrame KeyTime="0:0:0.70" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CarouselMagentaShift" Storyboard.TargetProperty="Y" Duration="0:0:0.7">
<LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.22" Value="1"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.38" Value="-2"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.58" Value="1"/>
<LinearDoubleKeyFrame KeyTime="0:0:0.70" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<!-- Cyan overlay opacity (flicker on/off during shift) -->
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CarouselCyanText" Storyboard.TargetProperty="Opacity" Duration="0:0:0.7">
<LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.10" Value="0.9"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.18" Value="0.0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.30" Value="0.9"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.50" Value="0.0"/>
<LinearDoubleKeyFrame KeyTime="0:0:0.70" Value="0.0"/>
</DoubleAnimationUsingKeyFrames>
<!-- Magenta overlay opacity (staggered flicker) -->
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="CarouselMagentaText" Storyboard.TargetProperty="Opacity" Duration="0:0:0.7">
<LinearDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.12" Value="0.9"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.22" Value="0.0"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.38" Value="0.9"/>
<DiscreteDoubleKeyFrame KeyTime="0:0:0.58" Value="0.0"/>
<LinearDoubleKeyFrame KeyTime="0:0:0.70" Value="0.0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ResourceDictionary>
</UserControl.Resources>
<Grid x:Name="RootGrid" CornerRadius="8,0,0,0">
<local:OpacityMaskView HorizontalAlignment="Stretch"
VerticalAlignment="Top">
<local:OpacityMaskView.OpacityMask>
<Rectangle Fill="{ThemeResource OverlayRadialGradient}" />
</local:OpacityMaskView.OpacityMask>
<local:AnimatedImage x:Name="BackDropImage"
Height="400"
ImageUrl="ms-appx:///Assets/TileImages/BackgroundBlur.png"
Visibility="Visible">
<common:UIElementExtensions.VisualFactory>
<common:PipelineVisualFactory>
<common:BlurEffect Amount="100.0" />
</common:PipelineVisualFactory>
</common:UIElementExtensions.VisualFactory>
</local:AnimatedImage>
</local:OpacityMaskView>
<ScrollViewer
x:Name="scrollViewer"
Grid.Row="1"
Margin="0,24,0,0"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Disabled"
VerticalScrollMode="Disabled">
<StackPanel
x:Name="TilePanel"
Padding="64,0,64,0"
Orientation="Horizontal"
Spacing="-48">
<local:HeaderTile
Description="Thanks for choosing the AppControl Manager"
Foreground="{StaticResource DarkTextGradient}"
Header="Welcome"
ImageUrl="ms-appx:///Assets/TileImages/1-Welcome.jpg"
SampleID="Welcome" />
<local:HeaderTile
Description="To Expand a Base Policy's Scope"
Foreground="{StaticResource LightTextGradient}"
Header="Create Supplemental Policy"
ImageUrl="ms-appx:///Assets/TileImages/2-Supplemental.jpg"
SampleID="Supplemental" />
<local:HeaderTile
Description="Specifically Tuned for High Performance Usage"
Foreground="{StaticResource LightTextGradient}"
Header="Lightning Fast"
ImageUrl="ms-appx:///Assets/TileImages/96584.jpg"
SampleID="HighPerf" />
<local:HeaderTile
Description="One Policy For Each App; Recommended Strategy"
Foreground="{StaticResource DarkTextGradient}"
Header="Create App Specific Policy"
ImageUrl="ms-appx:///Assets/TileImages/drop.jpg"
SampleID="AllowNewApps" />
<local:HeaderTile
Description="Block Drivers, Apps or Files Selectively"
Foreground="{StaticResource LightTextGradient}"
Header="Create Deny Policy"
ImageUrl="ms-appx:///Assets/TileImages/otherside.jpg"
SampleID="DenyPolicy" />
<local:HeaderTile
Description="Integration with Microsoft Defender for Endpoint"
Foreground="{StaticResource LightTextGradient}"
Header="Advanced Hunting Support"
ImageUrl="ms-appx:///Assets/TileImages/88876.jpg"
SampleID="AdvancedHunting" />
<local:HeaderTile
Description="Completely Trust the App and Review The Code"
Foreground="{StaticResource LightTextGradient}"
Header="Open Source"
ImageUrl="ms-appx:///Assets/TileImages/ddfAM.png"
SampleID="OpenSource" />
<local:HeaderTile
Description="Simulate App Control Policies Before Deployment"
Foreground="{StaticResource LightTextGradient}"
Header="Simulation"
ImageUrl="ms-appx:///Assets/TileImages/flower.jpg"
SampleID="Simulation" />
<local:HeaderTile
Description="Edit Every Aspect of App Control Policies"
Foreground="{StaticResource LightTextGradient}"
Header="Policy Editor"
ImageUrl="ms-appx:///Assets/TileImages/8786.jpg"
SampleID="PolicyEditor" />
</StackPanel>
</ScrollViewer>
<StackPanel Padding="24,12,24,24"
HorizontalAlignment="Center"
Orientation="Vertical"
Spacing="12">
<!-- Glitch-enabled title with two overlay layers are invisible by default
and are only shown during glitch via storyboard. -->
<Grid HorizontalAlignment="Center" IsHitTestVisible="False">
<TextBlock HorizontalAlignment="Center"
CharacterSpacing="48"
FontSize="40"
FontWeight="Bold"
Opacity="0.8"
Text="AppControl Manager"
TextAlignment="Center"
TextWrapping="Wrap">
<TextBlock.Foreground>
<LinearGradientBrush x:Name="AnimatedGradientBrush"
StartPoint="0,0"
EndPoint="1,1">
<GradientStop Offset="0.1"
Color="#303030" />
<GradientStop Offset="0.3"
Color="#4A4A4A" />
<GradientStop Offset="0.6"
Color="#161515" />
<GradientStop Offset="0.9"
Color="#303030" />
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
<!-- CYAN GLITCH LAYER (overlay; hidden when idle) -->
<TextBlock x:Name="CarouselCyanText"
HorizontalAlignment="Center"
CharacterSpacing="48"
FontSize="40"
FontWeight="Bold"
Text="AppControl Manager"
TextAlignment="Center"
TextWrapping="Wrap"
Foreground="#6000FFFF"
Opacity="0">
<TextBlock.RenderTransform>
<TranslateTransform x:Name="CarouselCyanShift" X="0" Y="0"/>
</TextBlock.RenderTransform>
</TextBlock>
<!-- MAGENTA GLITCH LAYER (overlay; hidden when idle) -->
<TextBlock x:Name="CarouselMagentaText"
HorizontalAlignment="Center"
CharacterSpacing="48"
FontSize="40"
FontWeight="Bold"
Text="AppControl Manager"
TextAlignment="Center"
TextWrapping="Wrap"
Foreground="#60FF00FF"
Opacity="0">
<TextBlock.RenderTransform>
<TranslateTransform x:Name="CarouselMagentaShift" X="0" Y="0"/>
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
<Grid RequestedTheme="Light">
<Grid Background="{ThemeResource AcrylicBackgroundFillColorBaseBrush}"
CornerRadius="12"
Opacity="0.6" />
<TextBlock Margin="10,4,10,4"
HorizontalAlignment="Center"
FontSize="12"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextAlignment="Center"
TextWrapping="Wrap">
<Run Text="Create Self-Sufficient and Independent Allow Listing Strategy For Your Systems." />
<Hyperlink NavigateUri="https://github.com/HotCakeX/Harden-Windows-Security/wiki/WDAC-policy-for-BYOVD-Kernel-mode-only-protection">Learn More</Hyperlink>
</TextBlock>
</Grid>
</StackPanel>
</Grid>
</UserControl>