-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGlassDialog.xaml
More file actions
99 lines (92 loc) · 4.35 KB
/
GlassDialog.xaml
File metadata and controls
99 lines (92 loc) · 4.35 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
<Window x:Class="AmpUp.GlassDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
MinWidth="320" MaxWidth="460">
<Window.Resources>
<Storyboard x:Key="FadeIn">
<DoubleAnimation Storyboard.TargetName="RootPanel"
Storyboard.TargetProperty="Opacity"
From="0" To="1" Duration="0:0:0.15">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="RootPanel"
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
From="0.95" To="1" Duration="0:0:0.15">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetName="RootPanel"
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
From="0.95" To="1" Duration="0:0:0.15">
<DoubleAnimation.EasingFunction>
<CubicEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</Window.Resources>
<Border x:Name="RootPanel" Opacity="0"
CornerRadius="14" Padding="24,20" Margin="8">
<Border.RenderTransform>
<ScaleTransform CenterX="0.5" CenterY="0.5" />
</Border.RenderTransform>
<Border.RenderTransformOrigin>0.5,0.5</Border.RenderTransformOrigin>
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#EE111111" Offset="0" />
<GradientStop Color="#DD0A0A0A" Offset="1" />
</LinearGradientBrush>
</Border.Background>
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#5500E676" Offset="0" />
<GradientStop Color="#2200E676" Offset="1" />
</LinearGradientBrush>
</Border.BorderBrush>
<Border.BorderThickness>1.2</Border.BorderThickness>
<Border.Effect>
<DropShadowEffect Color="#00E676" BlurRadius="24" Opacity="0.15" ShadowDepth="0" />
</Border.Effect>
<StackPanel>
<!-- Title -->
<TextBlock x:Name="TitleText"
FontFamily="Segoe UI" FontSize="10" FontWeight="Bold"
Foreground="#6600E676"
Margin="0,0,0,10" />
<!-- Message -->
<TextBlock x:Name="MessageText"
FontFamily="Segoe UI" FontSize="14" FontWeight="SemiBold"
Foreground="#E8E8E8"
TextWrapping="Wrap"
Margin="0,0,0,20" />
<!-- Custom content area (hidden by default) -->
<StackPanel x:Name="ContentArea" Margin="0,0,0,20" />
<!-- Input (hidden by default, shown for Prompt dialogs) -->
<Border x:Name="InputBorder" Visibility="Collapsed"
Background="#1A242424" BorderBrush="#3300E676"
BorderThickness="1" CornerRadius="8" Padding="2"
Margin="0,0,0,20">
<TextBox x:Name="InputBox"
FontFamily="Segoe UI" FontSize="14"
Foreground="#E8E8E8"
Background="Transparent"
BorderThickness="0"
CaretBrush="#00E676"
Padding="10,8" />
</Border>
<!-- Buttons -->
<StackPanel x:Name="ButtonPanel" Orientation="Horizontal" HorizontalAlignment="Right">
<!-- Buttons added in code-behind -->
</StackPanel>
</StackPanel>
</Border>
</Window>