-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
365 lines (326 loc) · 17.6 KB
/
MainWindow.xaml
File metadata and controls
365 lines (326 loc) · 17.6 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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<Window x:Class="AppxInstaller.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AppX Package Installer"
MinHeight="463"
MinWidth="412"
Height="463"
Width="412"
MaxHeight="700"
MaxWidth="666"
WindowStartupLocation="CenterScreen"
AllowDrop="True" Drop="Window_Drop" DragEnter="Window_DragEnter" DragOver="Window_DragOver"
Background="Transparent"
WindowStyle="None"
AllowsTransparency="True"
ResizeMode="CanResizeWithGrip">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<LinearGradientBrush x:Key="PrimaryGradient" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="Green" Offset="0"/>
<GradientStop Color="#FFA29BFE" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="CardGradient" StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#2D3038" Offset="0.25"/>
<GradientStop Color="#30333B" Offset="0.45"/>
<GradientStop Color="#33363F" Offset="0.75"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="WindowHeaderGradient" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#FF2D3038" Offset="0"/>
<GradientStop Color="#FF33363F" Offset="1"/>
</LinearGradientBrush>
<Style x:Key="CardStyle" TargetType="Border">
<Setter Property="Background" Value="{StaticResource CardGradient}"/>
<Setter Property="BorderBrush" Value="#33FFFFFF"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="CornerRadius" Value="38"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Black" BlurRadius="30" ShadowDepth="12" Opacity="10.4"/>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="WindowButtonStyle" TargetType="Button">
<Setter Property="Width" Value="30"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="15">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#20FFFFFF"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#30FFFFFF"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="CloseButtonStyle" TargetType="Button" BasedOn="{StaticResource WindowButtonStyle}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#E81123"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#C50E1F"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="CustomTooltipStyle" TargetType="ToolTip">
<Setter Property="Background" Value="{StaticResource CardGradient}"/>
<Setter Property="BorderBrush" Value="#33FFFFFF"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="8"
Padding="{TemplateBinding Padding}">
<Border.Effect>
<DropShadowEffect Color="Black" BlurRadius="10" ShadowDepth="3" Opacity="0.5"/>
</Border.Effect>
<ContentPresenter/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Storyboard x:Key="LoadingAnimation" RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetName="LoadingSpinner"
Storyboard.TargetProperty="RenderTransform.Angle"
From="0" To="360" Duration="0:0:1.5">
<DoubleAnimation.EasingFunction>
<QuadraticEase EasingMode="EaseInOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<Storyboard x:Key="CheckmarkAnimation">
<DoubleAnimation Storyboard.TargetName="SuccessCheckmark"
Storyboard.TargetProperty="Opacity"
From="0" To="1" Duration="0:0:0.2"/>
<DoubleAnimation Storyboard.TargetName="SuccessCheckmark"
Storyboard.TargetProperty="RenderTransform.ScaleX"
From="0.5" To="1" Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<BackEase EasingMode="EaseOut" Amplitude="0.3"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="SuccessCheckmark"
Storyboard.TargetProperty="RenderTransform.ScaleY"
From="0.5" To="1" Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<BackEase EasingMode="EaseOut" Amplitude="0.3"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<Storyboard x:Key="HideCheckmarkAnimation">
<DoubleAnimation Storyboard.TargetName="SuccessCheckmark"
Storyboard.TargetProperty="Opacity"
From="1" To="0" Duration="0:0:0.2"/>
</Storyboard>
<Storyboard x:Key="SuccessStatesFadeOutAnimation" Completed="SuccessStatesFadeOutAnimation_Completed">
<DoubleAnimation Storyboard.TargetName="SuccessStatePanel"
Storyboard.TargetProperty="Opacity"
From="1" To="0" Duration="0:0:0.4">
<DoubleAnimation.EasingFunction>
<QuadraticEase EasingMode="EaseInOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<Storyboard x:Key="EmptyStateFadeInAnimation">
<DoubleAnimation Storyboard.TargetName="EmptyStatePanel"
Storyboard.TargetProperty="Opacity"
From="0" To="1" Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<QuadraticEase EasingMode="EaseInOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</Window.Resources>
<Border Background="AliceBlue"
CornerRadius="15"
BorderBrush="#33FFFFFF"
BorderThickness="1">
<Border.Effect>
<DropShadowEffect Color="Black" BlurRadius="20" ShadowDepth="8" Opacity="0.6"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0"
Background="{StaticResource WindowHeaderGradient}"
CornerRadius="15,15,0,0"
MouseLeftButtonDown="Window_MouseLeftButtonDown">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
Text="AppX Package Installer"
Foreground="White"
FontSize="12"
FontWeight="Normal"
VerticalAlignment="Center"
Margin="15,0,0,0"/>
<StackPanel Grid.Column="1"
Orientation="Horizontal"
Margin="0,5,10,5">
<Button x:Name="MinimizeButton"
Style="{StaticResource WindowButtonStyle}"
Content=""
Click="MinimizeButton_Click"
Margin="0,0,5,0"/>
<Button x:Name="CloseButton"
Style="{StaticResource CloseButtonStyle}"
Content=""
Click="CloseButton_Click"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="1" Style="{StaticResource CardStyle}" Cursor="Hand" Padding="30,20" Margin="29,25" CornerRadius="20"
MouseLeftButtonUp="Border_MouseLeftButtonUp">
<Border.ToolTip>
<ToolTip Style="{StaticResource CustomTooltipStyle}">
<StackPanel>
<TextBlock Text="Simple tool for installing Windows packages" Margin="0,0,0,20"/>
<TextBlock Text="If you like my work, then visit my profile : " FontSize="13" Margin="0,0,0,2"/>
<TextBlock Text="https://github.com/EXLOUD"
FontSize="15"
FontStyle="Italic"
TextAlignment="Center"
Margin="0,0,0,20"/>
<TextBlock Text="Click on button for open Github profile"/>
</StackPanel>
</ToolTip>
</Border.ToolTip>
<TextBlock Text=": AppX Package Installer :"
FontSize="25" FontWeight="Light" Foreground="White"
HorizontalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FF6C5CE7" BlurRadius="10" ShadowDepth="0" Opacity="0.5"/>
</TextBlock.Effect>
</TextBlock>
</Border>
<Border Grid.Row="2" Style="{StaticResource CardStyle}" Margin="30,0,30,20">
<Border.ToolTip>
<ToolTip Style="{StaticResource CustomTooltipStyle}">
<StackPanel>
<TextBlock Text="Supported formats:" FontWeight="Bold" Margin="0,0,0,5"/>
<TextBlock Text="• .appx - Application Package"/>
<TextBlock Text="• .appxbundle - Bundle Package"/>
<TextBlock Text="• .msix - Modern Package"/>
<TextBlock Text="• .msixbundle - Modern Bundle"/>
<TextBlock Text="Just drag and drop your files here!" Margin="0,10,0,0" FontStyle="Italic"/>
</StackPanel>
</ToolTip>
</Border.ToolTip>
<Grid>
<StackPanel x:Name="EmptyStatePanel"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Visible"
Opacity="1">
<Path Width="48" Height="52" Fill="White" Margin="0,0,0,0"
Data="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" Stretch="Fill"/>
<TextBlock Text="Drag & Drop" FontSize="32" FontWeight="Light"
Foreground="White" HorizontalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FF6C5CE7" BlurRadius="10" ShadowDepth="0" Opacity="0.3"/>
</TextBlock.Effect>
</TextBlock>
<TextBlock Text="Drop your AppX packages here"
FontSize="16" Foreground="#AAFFFFFF"
HorizontalAlignment="Center" Margin="0,10,0,0"
TextWrapping="Wrap" TextAlignment="Center"/>
</StackPanel>
<StackPanel x:Name="LoadingStatePanel"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed">
<Grid Width="80" Height="80" Margin="0,0,0,20">
<Ellipse Width="80" Height="80"
Stroke="#33FFFFFF" StrokeThickness="2"/>
<Path x:Name="LoadingSpinner"
Width="80" Height="80"
Stroke="{StaticResource PrimaryGradient}"
StrokeThickness="4"
Data="M 40,4 A 36,36 0 0,1 76,40"
RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<RotateTransform Angle="0"/>
</Path.RenderTransform>
</Path>
</Grid>
<TextBlock Text="Installing packages..." FontSize="18" FontWeight="Light"
Foreground="White" HorizontalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FF6C5CE7" BlurRadius="8" ShadowDepth="0" Opacity="0.4"/>
</TextBlock.Effect>
</TextBlock>
<TextBlock x:Name="InstallationStatusText"
Text="Preparing installation..."
FontSize="14" Foreground="#AAFFFFFF"
HorizontalAlignment="Center" Margin="0,10,0,0"/>
</StackPanel>
<StackPanel x:Name="SuccessStatePanel"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="Collapsed"
Opacity="1">
<Grid Width="80" Height="80" Margin="0,0,0,20">
<Ellipse Width="80" Height="80"
Fill="{StaticResource PrimaryGradient}"
Opacity="0.2"/>
<Ellipse Width="80" Height="80"
Stroke="{StaticResource PrimaryGradient}"
StrokeThickness="3"/>
<Path x:Name="SuccessCheckmark"
Width="48"
Height="48"
Stroke="White"
StrokeThickness="5"
Fill="Transparent"
Opacity="0"
Data="M 12,24 L 20,32 L 40,16"
RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
</Path.RenderTransform>
</Path>
</Grid>
<TextBlock Text="Installation completed!" FontSize="18" FontWeight="Light"
Foreground="White" HorizontalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect Color="#FF6C5CE7" BlurRadius="8" ShadowDepth="0" Opacity="0.4"/>
</TextBlock.Effect>
</TextBlock>
<TextBlock Text="All packages installed successfully"
FontSize="14" Foreground="#AAFFFFFF"
HorizontalAlignment="Center" Margin="0,10,0,0"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
</Window>