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

    <!-- IconButton_Take -->
    <Style x:Key="IconButton_Take" TargetType="fcommon:IconButton">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Background" Value="#ff474747"></Setter>
        <Setter Property="Foreground" Value="White"></Setter>
        <Setter Property="BorderBrush" Value="#ff6c6c6c"></Setter>
        <Setter Property="BorderThickness" Value="0,0,0,3"></Setter>
        <Setter Property="IconWidth" Value="20"></Setter>
        <Setter Property="IconHeight" Value="20"></Setter>
        <Setter Property="Height" Value="30"></Setter>
        <Setter Property="Width" Value="120"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="fcommon:IconButton">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}">
                        <Grid x:Name="content">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="45"></ColumnDefinition>
                                <ColumnDefinition Width="*"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <Image Width="20" Height="20" HorizontalAlignment="Right" VerticalAlignment="Center"
                                   Source="{TemplateBinding Icon}"></Image>
                            <ContentPresenter Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"></ContentPresenter>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="BorderBrush" Value="#ff4e4bde"></Setter>
                            <Setter TargetName="content" Property="Opacity" Value="1"></Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="BorderBrush" Value="#aa4e4bde"></Setter>
                            <Setter TargetName="content" Property="Opacity" Value="0.9"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- IconButton_Preview -->
    <Style x:Key="IconButton_Preview" TargetType="fcommon:IconButton">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="Foreground" Value="White"></Setter>
        <Setter Property="BorderBrush" Value="Transparent"></Setter>
        <Setter Property="BorderThickness" Value="0"></Setter>
        <Setter Property="IconWidth" Value="30"></Setter>
        <Setter Property="IconHeight" Value="30"></Setter>
        <Setter Property="Height" Value="30"></Setter>
        <Setter Property="Width" Value="30"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="fcommon:IconButton">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}">
                        <Grid x:Name="content" Opacity="0.7">
                            <Image x:Name="img" Width="30" Height="30" Visibility="Visible"
                                   Source="{TemplateBinding Icon}"></Image>
                            <Image x:Name="img_hover" Width="30" Height="30" Visibility="Collapsed"
                                   Source="{TemplateBinding IconHover}"></Image>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="content" Property="Opacity" Value="1"></Setter>
                            <Setter TargetName="img" Property="Visibility" Value="Collapsed"></Setter>
                            <Setter TargetName="img_hover" Property="Visibility" Value="Visible"></Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="content" Property="Opacity" Value="0.9"></Setter>
                            <Setter TargetName="img" Property="Visibility" Value="Collapsed"></Setter>
                            <Setter TargetName="img_hover" Property="Visibility" Value="Visible"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- IconButton_Menu -->
    <Style x:Key="IconButton_Menu" TargetType="fcommon:IconButton">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="Foreground" Value="White"></Setter>
        <Setter Property="BorderBrush" Value="Transparent"></Setter>
        <Setter Property="BorderThickness" Value="0"></Setter>
        <Setter Property="Height" Value="20"></Setter>
        <Setter Property="Width" Value="20"></Setter>
        <Setter Property="IconWidth" Value="20"></Setter>
        <Setter Property="IconHeight" Value="20"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="fcommon:IconButton">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}">
                        <Grid x:Name="content" Opacity="1">
                            <Image x:Name="img" Visibility="Visible"
                                   Width="{TemplateBinding IconWidth}" Height="{TemplateBinding IconHeight}"
                                   Source="{TemplateBinding Icon}"></Image>
                            <Image x:Name="img_hover" Visibility="Collapsed"
                                   Width="{TemplateBinding IconWidth}" Height="{TemplateBinding IconHeight}"
                                   Source="{TemplateBinding IconHover}"></Image>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="content" Property="Opacity" Value="1"></Setter>
                            <Setter TargetName="img" Property="Visibility" Value="Collapsed"></Setter>
                            <Setter TargetName="img_hover" Property="Visibility" Value="Visible"></Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="content" Property="Opacity" Value="0.9"></Setter>
                            <Setter TargetName="img" Property="Visibility" Value="Collapsed"></Setter>
                            <Setter TargetName="img_hover" Property="Visibility" Value="Visible"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- IconButton_Menu_Mask -->
    <Style x:Key="IconButton_Menu_Mask" TargetType="fcommon:IconButton">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="Foreground" Value="White"></Setter>
        <Setter Property="BorderBrush" Value="Transparent"></Setter>
        <Setter Property="BorderThickness" Value="0"></Setter>
        <Setter Property="Width" Value="30"></Setter>
        <Setter Property="Height" Value="30"></Setter>
        <Setter Property="IconWidth" Value="20"></Setter>
        <Setter Property="IconHeight" Value="20"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="fcommon:IconButton">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}">
                        <Border x:Name="icon" Background="#BBFFFFFF" VerticalAlignment="Center" HorizontalAlignment="Center"
                                Width="{TemplateBinding IconWidth}" Height="{TemplateBinding IconHeight}">
                            <Border.OpacityMask>
                                <ImageBrush ImageSource="{Binding Icon,RelativeSource={RelativeSource AncestorType=fcommon:IconButton,Mode=FindAncestor}}"></ImageBrush>
                            </Border.OpacityMask>
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="#11FFFFFF"></Setter>
                            <Setter TargetName="icon" Property="Background" Value="#FF4E4BDE"></Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="icon" Property="Background" Value="#AA4E4BDE"></Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.2"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>