-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNativeMessageBox.xaml
More file actions
40 lines (37 loc) · 1.52 KB
/
NativeMessageBox.xaml
File metadata and controls
40 lines (37 loc) · 1.52 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
<Window x:Class="BlackScreenProtector.NativeMessageBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="退出?"
SizeToContent="WidthAndHeight"
WindowStyle="ToolWindow"
Topmost="True"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
ShowInTaskbar="False"
Focusable="True"
PreviewKeyDown="Window_PreviewKeyDown"
FontSize="20">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 顶部:提示文字 -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,20">
<TextBlock Text="❓ 是否退出黑屏保护?"
FontSize="24" FontWeight="SemiBold"
VerticalAlignment="Center"
TextWrapping="Wrap"/>
</StackPanel>
<!-- 底部:按钮组 -->
<StackPanel Grid.Row="1" Orientation="Horizontal"
HorizontalAlignment="Center">
<Button x:Name="ExitButton" Content="是(Y)"
Width="90" Height="50" FontSize="18"
Margin="15,0" Click="ExitButton_Click"/>
<Button x:Name="StayButton"
Width="120" Height="50" FontSize="18"
Margin="15,0" Click="StayButton_Click"/>
</StackPanel>
</Grid>
</Window>