Repository navigation
Expand file tree
/
Copy pathCustomMessageBox.xaml
More file actions
112 lines (105 loc) · 5.54 KB
/
Copy pathCustomMessageBox.xaml
File metadata and controls
112 lines (105 loc) · 5.54 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
<Window x:Class="VivaldiUpdater.CustomMessageBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Message" Height="250" Width="400"
AllowsTransparency="True" Background="Transparent"
WindowStyle="None" ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="tinyStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<!-- Semi-transparent overlay background -->
<Border Background="#80000000" CornerRadius="20">
<!-- Main content card -->
<Border MinWidth="380" MaxWidth="600" MinHeight="200" MaxHeight="500"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="#EFD6F3" CornerRadius="15">
<Border.Effect>
<DropShadowEffect BlurRadius="20" Direction="270" ShadowDepth="5" Color="#40000000" />
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="*" />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<!-- Title Bar -->
<Border Grid.Row="0" Background="#F5798B" CornerRadius="15,15,0,0" MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
<Grid>
<TextBlock x:Name="TitleText"
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="16" FontWeight="Bold" Foreground="White"
Text="Title" />
<Button
Width="30"
Height="30"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Click="CloseButton_Click"
Content="×"
Cursor="Hand"
FontSize="18"
FontWeight="Bold"
Foreground="White"
Margin="0,0,5,0">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="15">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF1493" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
</Button>
</Grid>
</Border>
<!-- Content Area -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Margin="15,10">
<TextBlock x:Name="MessageText"
TextWrapping="Wrap"
FontSize="14"
Foreground="#333333"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextAlignment="Center"/>
</ScrollViewer>
<!-- Buttons Area -->
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="OkButton"
Width="100" Height="40"
Content="OK"
Click="OkButton_Click"
Style="{StaticResource ApplePriButtonStyle}"
Margin="10,0"
Visibility="Visible"/>
<Button x:Name="CancelButton"
Width="100" Height="40"
Content="Cancel"
Click="CancelButton_Click"
Style="{StaticResource ApplePriButtonStyle}"
Margin="10,0"
Visibility="Collapsed"/> <!-- Hidden by default -->
</StackPanel>
</Grid>
</Border>
</Border>
</Window>