<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="Button_Close" TargetType="Button">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Width" Value="50"></Setter>
        <Setter Property="Height" Value="40"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="bd" BorderBrush="Transparent" BorderThickness="1" Background="Transparent">
                        <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="20" Height="20" RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <RotateTransform Angle="0"/>
                            </Grid.RenderTransform>
                            <Rectangle Width="20" Height="2" Fill="White" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <RotateTransform Angle="45"/>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle Width="20" Height="2" Fill="White" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <RotateTransform Angle="-45"/>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="bd" Property="Background" Value="#22ffffff"></Setter>
                        </Trigger>
                        <EventTrigger RoutedEvent="MouseEnter">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
                                                     Duration="00:00:00.3" To="180"></DoubleAnimation>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="MouseLeave">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" 
                                                     Duration="00:00:00.3" To="0"></DoubleAnimation>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Button_Min" TargetType="Button">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Width" Value="50"></Setter>
        <Setter Property="Height" Value="40"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="bd" BorderBrush="Transparent" BorderThickness="1" Background="Transparent">
                        <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="20" Height="20" RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <RotateTransform Angle="0"/>
                            </Grid.RenderTransform>
                            <Rectangle Width="20" Height="2" Fill="White" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5"></Rectangle>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="bd" Property="Background" Value="#22ffffff"></Setter>
                        </Trigger>
                        <EventTrigger RoutedEvent="MouseEnter">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
                                                     Duration="00:00:00.3" To="180"></DoubleAnimation>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="MouseLeave">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" 
                                                     Duration="00:00:00.3" To="0"></DoubleAnimation>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Button_Setting" TargetType="Button">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Width" Value="50"></Setter>
        <Setter Property="Height" Value="40"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="bd" BorderBrush="Transparent" BorderThickness="1" Background="Transparent">
                        <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="20" Height="20" RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <RotateTransform Angle="0"/>
                            </Grid.RenderTransform>
                            <Image Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center"
                                   Source="/VIZ.Framework.Common.Resource;component/Icons/setting_32x32.png"></Image>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="bd" Property="Background" Value="#22ffffff"></Setter>
                        </Trigger>
                        <EventTrigger RoutedEvent="MouseEnter">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
                                                     Duration="00:00:00.3" To="180"></DoubleAnimation>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="MouseLeave">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" 
                                                     Duration="00:00:00.3" To="0"></DoubleAnimation>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>