<UserControl x:Class="Correlator.Dialog.AlertControlDialog" 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:AlertControlDialogViewModel}" 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" /> </Style> </prism:Dialog.WindowStyle> <Border Margin="2" Background="White" CornerRadius="10"> <Border.Effect> <DropShadowEffect BlurRadius="5" Direction="0" Opacity="0.5" ShadowDepth="0" Color="DarkBlue" /> </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" FontWeight="Bold" Text="{Binding Title}" /> </DockPanel> <TextBlock Grid.Row="1" Margin="70,0,20,0" FontSize="16" Text="{Binding AlertMessage}" TextWrapping="Wrap" /> </Grid> <StackPanel Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal"> <Button Width="80" Height="35" Margin="20" Command="{Binding AlertCancelCommand}" Content="取消" FontSize="16" /> <Button Width="80" Height="35" Margin="20" Command="{Binding AlertDetermineCommand}" Content="确定" FontSize="16" Style="{StaticResource ButtonPrimary}" /> </StackPanel> </Grid> </Border> </UserControl>