Files
FT479/WPFWCSDemo/Views/CustomComponent/MessageDialog.xaml
2026-06-29 14:46:32 +08:00

47 lines
2.3 KiB
XML

<Window x:Class="WPFWCSDemo.Views.MessageDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:WPFWCSDemo.ViewModels.CustomComponent"
mc:Ignorable="d"
d:DesignHeight="160" d:DesignWidth="270"
MaxHeight="200"
MaxWidth="300"
AllowsTransparency="True"
Topmost="True"
WindowState="Normal"
WindowStyle="None"
BorderBrush="BlueViolet"
BorderThickness="3"
WindowStartupLocation="CenterScreen"
Background="GhostWhite"
x:Name="messageWindow"
>
<Window.Effect>
<DropShadowEffect BlurRadius="20" ShadowDepth="15" Direction="225" Opacity="0.7"/>
</Window.Effect>
<DockPanel>
<md:ColorZone x:Name="colorZone" CornerRadius="0" Padding="0" Height="30" md:ElevationAssist.Elevation="Dp4" DockPanel.Dock="Top" Mode="PrimaryMid">
<TextBlock Text="{Binding Caption}" VerticalAlignment="Center" Margin="20 0"/>
</md:ColorZone>
<md:ColorZone Height="6" CornerRadius="0"/>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" Text="{Binding Content}" Style="{StaticResource MaterialDesignTextBlock}" VerticalAlignment="Center" LineHeight="20" HorizontalAlignment="Center" Padding="30 20 30 0"/>
<DockPanel Grid.Row="2" LastChildFill="False" Margin="20,10,20,0">
<Button Content="确定" Background="Lavender" Width="100" IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" Command="{Binding AcceptCommand}"/>
<Button Content="取消" Background="Lavender" Width="100" Style="{StaticResource MaterialDesignFlatButton}" DockPanel.Dock="Right" Command="{Binding CancelCommand}" CommandParameter="{Binding MessageDialog}"/>
</DockPanel>
</Grid>
</DockPanel>
</Window>