<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:customControl ="clr-namespace:PDF_Office.CustomControl"
                    >

    <SolidColorBrush x:Key="Common.Border" Color="#FF273C62"/>
    <SolidColorBrush x:Key="Common.ForGround.Blue" Color="#FF273C62"/>
    <SolidColorBrush x:Key="Common.ForGround.Black" Color="#FF000000"/>
    <SolidColorBrush x:Key="Button.Static.Background" Color="#273C62"/>
    <SolidColorBrush x:Key="Button.Static.Border" Color="#FF273C62"/>
    <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#1A477EDE"/>
    <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#273C62"/>
    <SolidColorBrush x:Key="Button.Pressed.Background" Color="#29477EDE"/>
    <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
    <SolidColorBrush x:Key="Button.Disabled.Background" Color="#273C62"/>
    <SolidColorBrush x:Key="Button.Disabled.Border" Color="#273C62"/>
    <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#26FFFFFF"/>
    <SolidColorBrush x:Key="CloseButton.MouseOver.Foreground" Color="Red"/>
    <SolidColorBrush x:Key="Disabled.ForeGround" Color="#FFE2E3E6" />
    <SolidColorBrush x:Key="BlueBtn.Mouseover.Background" Color="#31538D" />
    <SolidColorBrush x:Key="BlueBtn.Pressed.Background" Color="#1B2944" />
    <SolidColorBrush x:Key="Redact.Background" Color="#477EDE"/>

    <Style x:Key="ToggleBtnViewModeStyle"  TargetType="customControl:CustomIconToggleBtn">
        <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Margin" Value="4,0,4,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <Grid >
                            <Grid  Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image x:Name="ImageIcon" Width="20" Height="20" Source="{Binding Icon,RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed"/>
                            </Grid>
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Background" Value="{StaticResource Button.Pressed.Background}"></Setter>
            </Trigger>
            <Trigger Property="IsChecked" Value="False">
                <Setter Property="Background" Value="Transparent"></Setter>
            </Trigger>
            <Trigger Property="IsChecked" Value="{x:Null}">
                <Setter Property="Background" Value="Transparent"></Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <SolidColorBrush x:Key="Button.Select.Background" Color="#1770F4" Opacity="0.1"/>
    <SolidColorBrush x:Key="Button.SelectForeground.Background" Color="#1770F4"/>

    <Style x:Key="ToggleBtnSelectStyle"  TargetType="customControl:CustomIconToggleBtn">
        <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
        <Setter Property="Foreground" Value="#8F96A7"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Margin" Value="4,0,4,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <Grid >
                            <Grid  Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image x:Name="ImageIcon" Width="20" Height="20" Source="{Binding Icon,RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed"/>
                            </Grid>
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Background" Value="{StaticResource Button.Select.Background}"></Setter>
                <Setter Property="Foreground"  Value="{StaticResource Button.SelectForeground.Background}"></Setter>
            </Trigger>
            <Trigger Property="IsChecked" Value="False">
                <Setter Property="Background" Value="Transparent"></Setter>
            </Trigger>
            <Trigger Property="IsChecked" Value="{x:Null}">
                <Setter Property="Background" Value="Transparent"></Setter>
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="BlueBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="#1460F3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource BlueBtn.Mouseover.Background}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" TargetName="border" Value="{StaticResource BlueBtn.Pressed.Background}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="border" Value="#33000000"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999"/>
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="InsideBarBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Width" Value="auto"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,0" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="border" Value="#1A000000"/>
                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" TargetName="border" Value="#26000000"/>
                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="border" Value="Transparent"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="#33000000"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999"/>
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.4"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="CompressBtn" TargetType="Button">
        <Setter Property="Background" Value="White"/>
        <Setter Property="BorderBrush" Value="White"/>
        <Setter Property="Width" Value="528"/>
        <Setter Property="Height" Value="64"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" BorderBrush="Black" BorderThickness="1,1,1,1" Background="{TemplateBinding Background}" SnapsToDevicePixels="true" CornerRadius="7,7,7,7">
                        <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="border" Value="#1A000000"/>
                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" TargetName="border" Value="#26000000"/>
                            <Setter Property="BorderBrush" TargetName="border" Value= "gray"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="border" Value="Transparent"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="#33000000"/>
                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#FF999999"/>
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.4"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>