<UserControl x:Class="Correlator.Dialog.AlertMessageDialog" 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" xmlns:prism="http://prismlibrary.com/" xmlns:vm="clr-namespace:Correlator.ViewModels" Width="350" Height="200" d:DataContext="{d:DesignInstance Type=vm:AlertMessageDialogViewModel}" mc:Ignorable="d"> <prism:Dialog.WindowStyle> <Style TargetType="Window"> <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterOwner" /> <Setter Property="ShowInTaskbar" Value="False" /> <Setter Property="SizeToContent" Value="WidthAndHeight" /> <Setter Property="WindowStyle" Value="None" /> <Setter Property="AllowsTransparency" Value="True" /> <Setter Property="Background" Value="Transparent" /> </Style> </prism:Dialog.WindowStyle> <Border Margin="3" Background="White" CornerRadius="10"> <Border.Effect> <DropShadowEffect BlurRadius="5" Direction="0" Opacity="0.5" ShadowDepth="0" Color="Blue" /> </Border.Effect> <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition /> </Grid.RowDefinitions> <DockPanel Grid.Row="0" LastChildFill="True"> <TextBlock Margin="20" FontFamily="/Correlator;component/Fonts/#iconfont" FontSize="30" Foreground="{Binding AlertIconColor}" Text="{Binding AlertIcon}" /> <TextBlock Margin="0,0,20,0" VerticalAlignment="Center" FontSize="18" Text="{Binding Title}" /> </DockPanel> <TextBlock Grid.Row="1" Margin="70,0,20,0" FontSize="16" Text="{Binding AlertMessage}" TextWrapping="Wrap" /> </Grid> <Button Grid.Row="1" Width="125" Height="40" Margin="20" HorizontalAlignment="Right" Command="{Binding CloseAlertCommand}" Content="知道了" Style="{StaticResource FunctionButtonStyle}" /> </Grid> </Border> </UserControl>