<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:common="clr-namespace:VIZ.Framework.Common">

    <Style x:Key="VMessageBox_Button_Yes" TargetType="Button">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Width" Value="140"></Setter>
        <Setter Property="Height" Value="45"></Setter>
        <Setter Property="Margin" Value="10,0,10,0"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="bd" CornerRadius="10" Background="#aa007cff">
                        <TextBlock Text="确定" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Foreground="White"></TextBlock>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="bd" Property="Background" Value="#ff007cff"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="VMessageBox_Button_Cancel" TargetType="Button">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Width" Value="140"></Setter>
        <Setter Property="Height" Value="45"></Setter>
        <Setter Property="Margin" Value="10,0,10,0"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="bd" CornerRadius="10" Background="#aadcdcdc">
                        <TextBlock Text="取消" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Foreground="Black"></TextBlock>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="bd" Property="Background" Value="#ffdcdcdc"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="common:MessageBoxEx">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Width" Value="400"></Setter>
        <Setter Property="Height" Value="300"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="common:MessageBoxEx">
                    <Border Background="White" BorderBrush="#22000000" BorderThickness="1" CornerRadius="40">
                        <Border.Effect>
                            <DropShadowEffect Opacity="0.36"/>
                        </Border.Effect>
                        <Grid Margin="30,20,30,20">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="80"></RowDefinition>
                                <RowDefinition Height="*"></RowDefinition>
                                <RowDefinition Height="80"></RowDefinition>
                            </Grid.RowDefinitions>
                            <common:DragWindowBar Grid.RowSpan="3" Background="Transparent"></common:DragWindowBar>
                            <TextBlock Text="{TemplateBinding Title}" Foreground="Black" FontSize="40" VerticalAlignment="Center" HorizontalAlignment="Left"
                                       FontWeight="Black"></TextBlock>
                            <TextBlock Grid.Row="1" Text="{TemplateBinding Message}" Foreground="Black" FontSize="24" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"></TextBlock>
                            <StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
                                <Button x:Name="PART_CancelButton" Grid.Row="2" Style="{StaticResource VMessageBox_Button_Cancel}" Content="取消" Visibility="Hidden"></Button>
                                <Button x:Name="PART_YesButton" Grid.Row="2" Style="{StaticResource VMessageBox_Button_Yes}" Content="确定"></Button>
                            </StackPanel>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Buttons" Value="YES_CANCEL">
                            <Setter TargetName="PART_CancelButton" Property="Visibility" Value="Visible"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>