<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
    xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Style x:Key="ButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle
                        Margin="2"
                        SnapsToDevicePixels="true"
                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                        StrokeDashArray="1 2"
                        StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Login_Btn" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource Color_BG_Button}" />
        <Setter Property="BorderBrush" Value="{DynamicResource Color_BD_Button}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontSize" Value="17" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Foreground" Value="{DynamicResource Color_FG_Button}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="border"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="True">
                        <Grid>
                            <Border BorderBrush="{DynamicResource Color_BD_Button_InnerGrow}" BorderThickness="1">
                                <Border.Effect>
                                    <BlurEffect />
                                </Border.Effect>
                            </Border>
                            <Border
                                x:Name="Highlight"
                                Background="{DynamicResource Color_BG_Button_Highlight}"
                                BorderThickness="1"
                                Opacity="0">
                                <Border.Effect>
                                    <BlurEffect />
                                </Border.Effect>
                            </Border>
                            <TextBlock
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Foreground="{TemplateBinding Foreground}"
                                Text="{TemplateBinding Content}">
                                <TextBlock.Effect>
                                    <DropShadowEffect
                                        BlurRadius="3"
                                        ShadowDepth="2"
                                        Color="#FF008A40" />
                                </TextBlock.Effect>
                            </TextBlock>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Highlight" Property="Opacity" Value="0.5" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Highlight" Property="Opacity" Value="0.5" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#ADADAD" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SysBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource Color_BG_LoginButton}" />
        <Setter Property="BorderBrush" Value="{DynamicResource Color_BD_LoginButton}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Foreground" Value="{DynamicResource Color_FG_Button_Window}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="Bd"
                        Background="{DynamicResource Color_BG_WindowButton}"
                        BorderBrush="{DynamicResource Color_BD_WindowButton}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Cursor="Hand"
                        SnapsToDevicePixels="true">
                        <Grid>
                            <Border BorderBrush="{DynamicResource Color_BD_WindowButton_InnerGrow}" BorderThickness="1">
                                <Border.Effect>
                                    <BlurEffect />
                                </Border.Effect>
                            </Border>
                            <Border
                                x:Name="Highlight"
                                Background="{DynamicResource Color_BG_WindowButton_Highlight}"
                                BorderThickness="1"
                                Opacity="0">
                                <Border.Effect>
                                    <BlurEffect />
                                </Border.Effect>
                            </Border>
                            <ContentPresenter
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Cursor="Hand"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true" />
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Highlight" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#ADADAD" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SysCloseBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource Color_BG_LoginButton}" />
        <Setter Property="BorderBrush" Value="{DynamicResource Color_BD_LoginButton}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Foreground" Value="{DynamicResource Color_FG_Button_Window}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="Bd"
                        Background="{DynamicResource Color_BG_WindowButton}"
                        BorderBrush="{DynamicResource Color_BD_WindowButton}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Cursor="Hand"
                        SnapsToDevicePixels="true">
                        <Grid>
                            <Border BorderBrush="{DynamicResource Color_BD_WindowButton_InnerGrow}" BorderThickness="1">
                                <Border.Effect>
                                    <BlurEffect />
                                </Border.Effect>
                            </Border>
                            <Border
                                x:Name="Highlight"
                                Background="{DynamicResource Color_BG_WindowButton_Highlight}"
                                BorderThickness="1"
                                Opacity="0">
                                <Border.Effect>
                                    <BlurEffect />
                                </Border.Effect>
                            </Border>
                            <ContentPresenter
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Cursor="Hand"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true" />
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Highlight" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#ADADAD" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <RadialGradientBrush x:Key="highLight">
        <GradientStop Offset="1" Color="#FF64D7FF" />
        <GradientStop Offset="0.2" Color="White" />
    </RadialGradientBrush>

    <SolidColorBrush x:Key="OnOffButton_Off" Color="Gray" />
    <SolidColorBrush x:Key="OnOffButton_BD" Color="#FF004900" />
    <RadialGradientBrush x:Key="OnOffButton_BG">
        <GradientStop Offset="0.25" Color="#FF003F0F" />
        <GradientStop Offset="1" Color="#FF067421" />
    </RadialGradientBrush>
    <RadialGradientBrush x:Key="OnOffButton_BG_Highlight">
        <GradientStop Offset="0" Color="#FF89FFA6" />
        <GradientStop Offset="1" Color="#FF00FF3F" />
    </RadialGradientBrush>
    <RadialGradientBrush x:Key="OnOffButton_BG_Unable">
        <GradientStop Offset="0" Color="#FF939393" />
        <GradientStop Offset="1" Color="#FFCACACA" />
    </RadialGradientBrush>

    <Style x:Key="Lamp-Button" TargetType="{x:Type controls:SwitchButton}">
        <Setter Property="Width" Value="16" />
        <Setter Property="Height" Value="16" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:SwitchButton}">
                    <Grid>
                        <Ellipse
                            x:Name="BG"
                            Fill="{DynamicResource OnOffButton_Off}"
                            Stroke="{DynamicResource OnOffButton_BD}"
                            StrokeThickness="1" />
                        <Ellipse
                            x:Name="Highlight"
                            Margin="1"
                            Fill="{DynamicResource OnOffButton_BG_Highlight}"
                            Visibility="Collapsed">
                            <Ellipse.Effect>
                                <BlurEffect Radius="5" />
                            </Ellipse.Effect>
                        </Ellipse>
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content=""
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ON" Value="True">
                            <Setter TargetName="Highlight" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="ON" Value="False">
                            <Setter TargetName="Highlight" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsDefaulted" Value="True" />
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BG" Property="Fill" Value="{DynamicResource OnOffButton_BG_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <LinearGradientBrush x:Key="OperatioNButton_BG_Outer" StartPoint="0.85,0.864" EndPoint="0.238,0.239">
        <GradientStop Offset="0" Color="#FF3D3D3D" />
        <GradientStop Offset="1" Color="White" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="OperatioNButton_BD_Outer" StartPoint="1.192,1.066" EndPoint="0.104,0.195">
        <GradientStop Offset="0" Color="#FF5C5C5C" />
        <GradientStop Offset="1" Color="#FFE0E0E0" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="OperatioNButton_BD_Inner" StartPoint="0.155,0.138" EndPoint="1.141,1.123">
        <GradientStop Offset="0" Color="Black" />
        <GradientStop Offset="1" Color="White" />
    </LinearGradientBrush>
    <RadialGradientBrush x:Key="OperatioNButton_BG" GradientOrigin="0.234,0.241">
        <GradientStop Offset="0" Color="#FF004911" />
        <GradientStop Offset="1" Color="#FF001D07" />
    </RadialGradientBrush>
    <RadialGradientBrush x:Key="OperatioNButton_BG_Highlight" GradientOrigin="0.234,0.241">
        <GradientStop Offset="0" Color="#FF9EFFB6" />
        <GradientStop Offset="1" Color="#FF00D633" />
    </RadialGradientBrush>
    <LinearGradientBrush x:Key="OperatioNButton_BG_Outer_Unable" StartPoint="1.192,1.066" EndPoint="0.104,0.195">
        <GradientStop Offset="0" Color="Black" />
        <GradientStop Offset="1" Color="#FFD0D0D0" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="OperatioNButton_BD_Outer_Unable" Color="#FF939393" />
    <LinearGradientBrush x:Key="OperatioNButton_BD_Inner_Unable" StartPoint="0.155,0.138" EndPoint="1.141,1.123">
        <GradientStop Offset="0" Color="Black" />
        <GradientStop Offset="1" Color="#FFD0D0D0" />
    </LinearGradientBrush>
    <RadialGradientBrush x:Key="OperatioNButton_BG_Unable" GradientOrigin="0.234,0.241">
        <GradientStop Offset="0" Color="#FF858585" />
        <GradientStop Offset="1" Color="#FF4E4E4E" />
    </RadialGradientBrush>

    <Style x:Key="OperationButton" TargetType="{x:Type controls:SwitchButton}">
        <Setter Property="Width" Value="18" />
        <Setter Property="Height" Value="18" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:SwitchButton}">
                    <Grid>
                        <Ellipse
                            x:Name="BG"
                            Fill="{DynamicResource OperatioNButton_BG_Outer}"
                            Stroke="{DynamicResource OperatioNButton_BD_Outer}"
                            StrokeThickness="0.5" />
                        <Ellipse
                            x:Name="Inner_BG"
                            Margin="2"
                            Fill="{DynamicResource OperatioNButton_BD_Inner}" />
                        <Ellipse
                            x:Name="Close"
                            Margin="3"
                            Cursor="Hand"
                            Fill="{DynamicResource OperatioNButton_BG}" />
                        <Ellipse
                            x:Name="Open"
                            Margin="3"
                            Cursor="Hand"
                            Fill="{DynamicResource OperatioNButton_BG_Highlight}"
                            Visibility="Collapsed">
                            <Ellipse.Effect>
                                <DropShadowEffect
                                    BlurRadius="3"
                                    ShadowDepth="0"
                                    Color="White" />
                            </Ellipse.Effect>
                        </Ellipse>
                        <ContentPresenter
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content=""
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ON" Value="True">
                            <Setter TargetName="Open" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="ON" Value="False">
                            <Setter TargetName="Open" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsDefaulted" Value="True" />
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BG" Property="Fill" Value="{DynamicResource OperatioNButton_BG_Outer_Unable}" />
                            <Setter TargetName="BG" Property="Stroke" Value="{DynamicResource OperatioNButton_BD_Outer_Unable}" />
                            <Setter TargetName="Inner_BG" Property="Fill" Value="{DynamicResource OperatioNButton_BD_Inner_Unable}" />
                            <Setter TargetName="Close" Property="Fill" Value="{DynamicResource OperatioNButton_BG_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  Normal Button style  -->

    <SolidColorBrush x:Key="Button_BG" Color="#FF6398CC" />
    <SolidColorBrush x:Key="Button_BD" Color="#FFC6D8EC" />
    <SolidColorBrush x:Key="Button_BD_Shadow" Color="#FF284775" />
    <SolidColorBrush x:Key="Button_BG_MouseOver" Color="#FF4FCBFF" />
    <SolidColorBrush x:Key="Button_BG_Press" Color="#FF5A89D4" />
    <SolidColorBrush x:Key="Button_BG_Unable" Color="#FFD2D2D2" />
    <SolidColorBrush x:Key="Button_BD_Unable" Color="#FFF3F3F3" />
    <SolidColorBrush x:Key="Button_BD_Shadow_Unable" Color="#FF9D9D9D" />

    <Style TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="Background" Value="{StaticResource Button_BG}" />
        <Setter Property="BorderBrush" Value="{StaticResource Button_BD}" />
        <Setter Property="BorderThickness" Value="1,1,0,0" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Foreground" Value="{DynamicResource FG_White}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="6,3" />
        <Setter Property="MinWidth" Value="40" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Border.CornerRadius" Value="4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="BG"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding Border.CornerRadius}"
                        Cursor="Hand"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Border
                            x:Name="Inner_BD"
                            Padding="5,1"
                            BorderBrush="{StaticResource Button_BD_Shadow}"
                            BorderThickness="0,0,1,1"
                            CornerRadius="3">
                            <ContentPresenter
                                x:Name="contentpresenter"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Cursor="Hand"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BG" Property="Background" Value="{StaticResource Button_BG_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BG" Property="Background" Value="{StaticResource Button_BG_Press}" />
                            <Setter TargetName="BG" Property="Margin" Value="1" />
                            <Setter Property="FontSize" Value="13" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BG" Property="Background" Value="{StaticResource Button_BG_Unable}" />
                            <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource Button_BD_Unable}" />
                            <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource Button_BD_Shadow_Unable}" />
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Color_Button" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="Background" Value="Black" />
        <Setter Property="BorderBrush" Value="{StaticResource Button_BD}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Foreground" Value="{DynamicResource FG_Black}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Border.CornerRadius" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Rectangle Fill="Gray" />
                        <Border
                            x:Name="BG"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{TemplateBinding Border.CornerRadius}"
                            Cursor="Hand"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Grid>
                                <Border
                                    x:Name="Inner_BG"
                                    Background="White"
                                    CornerRadius="{TemplateBinding Border.CornerRadius}"
                                    Opacity="0" />
                                <ContentPresenter
                                    x:Name="contentpresenter"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Cursor="Hand"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                    <ContentPresenter.Effect>
                                        <DropShadowEffect
                                            BlurRadius="0"
                                            Direction="135"
                                            ShadowDepth="1"
                                            Color="White" />
                                    </ContentPresenter.Effect>
                                </ContentPresenter>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Inner_BG" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Inner_BG" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BG" Property="Background" Value="{StaticResource Button_BG_Unable}" />
                            <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource Button_BD_Unable}" />
                            <Setter TargetName="Inner_BG" Property="Background" Value="{StaticResource Button_InnerBG_Unable}" />
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter TargetName="contentpresenter" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Direction="135"
                                        Opacity="0"
                                        ShadowDepth="1"
                                        Color="White" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  Top Button  -->

    <SolidColorBrush x:Key="TopButton_BD" Color="#FFB2BACF" />
    <SolidColorBrush x:Key="TopButton_BG" Color="#FF2F457E" />

    <LinearGradientBrush x:Key="TopButton_InnerBG" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#00D1DEED" />
        <GradientStop Offset="1" Color="#008EABD0" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TopButton_BG_MouseOver" Color="#FF4F71B6" />
    <LinearGradientBrush x:Key="TopButton_InnerBG_MouseOver" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#00D1E7ED" />
        <GradientStop Offset="1" Color="#0043BFE9" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TopButton_BD_Highlight" Color="White" />
    <SolidColorBrush x:Key="TopButton_BG_Press" Color="#FF4F71B6" />
    <LinearGradientBrush x:Key="TopButton_InnerBG_Press" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#00D8E7F5" />
        <GradientStop Offset="1" Color="#00A3C7E9" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="FG_Button_Unable" Color="#FF757575" />
    <SolidColorBrush x:Key="TopButton_BG_Unable" Color="#FFD4D4D4" />
    <SolidColorBrush x:Key="TopButton_BD_Unable" Color="WhiteSmoke" />
    <SolidColorBrush x:Key="TopButton_InnerBG_Unable" Color="#FFA7A8AA" />
    <SolidColorBrush x:Key="TopButton_Shadow" Color="#FF162858" />
    <SolidColorBrush x:Key="TopButton_BG_Highlight" Color="#FF4F71B6" />

    <Style x:Key="TopButton" TargetType="{x:Type Button}">
        <Setter Property="Height" Value="38" />
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="Background" Value="{StaticResource TopButton_BG}" />
        <Setter Property="BorderBrush" Value="{StaticResource TopButton_BD}" />
        <Setter Property="BorderThickness" Value="1,1,0,0" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Foreground" Value="{DynamicResource FG_White}" />
        <Setter Property="Border.CornerRadius" Value="5" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="border"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding Border.CornerRadius}"
                        Cursor="Hand"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Border
                            x:Name="border_shadow"
                            BorderBrush="{DynamicResource TextBox_Top_Shadow}"
                            BorderThickness="0,0,1,1"
                            CornerRadius="5">
                            <ContentPresenter
                                x:Name="contentpresenter"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Cursor="Hand"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TopButton_BD_Highlight}" />
                            <Setter TargetName="border" Property="Background" Value="{StaticResource TopButton_BG_Highlight}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TopButton_BD_Highlight}" />
                            <Setter TargetName="border" Property="Background" Value="{StaticResource TopButton_BG_Highlight}" />
                            <Setter Property="FontSize" Value="15" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource TopButton_BD_Unable}" />
                            <Setter TargetName="border" Property="Background" Value="{StaticResource TopButton_BG_Unable}" />
                            <Setter TargetName="border_shadow" Property="BorderBrush" Value="{StaticResource TopButton_InnerBG_Unable}" />
                            <Setter Property="Foreground" Value="{StaticResource FG_Button_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  Logout Button  -->

    <SolidColorBrush x:Key="TopMenuButton_BD" Color="#FFBBD8E5" />
    <LinearGradientBrush x:Key="TopMenuButton_BG" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FF5E5E5E" />
        <GradientStop Offset="1" Color="#FF474B4E" />
        <GradientStop Offset="0.5" Color="#FF242424" />
        <GradientStop Offset="0.75" Color="#FF1F1F1F" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TopMenuButton_BG_Highlight" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FF0076B2" />
        <GradientStop Offset="1" Color="#FF0076B2" />
        <GradientStop Offset="0.5" Color="#FF00466A" />
        <GradientStop Offset="0.75" Color="#FF00466A" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TopMenuButton_BD_Highlight" Color="#FFF0FAFF" />
    <LinearGradientBrush x:Key="TopMenuButton_BG_Unable" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FFAFAFAF" />
        <GradientStop Offset="1" Color="#FFAFAFAF" />
        <GradientStop Offset="0.5" Color="#FF6C6C6C" />
        <GradientStop Offset="0.25" Color="#FF7A7A7A" />
        <GradientStop Offset="0.75" Color="#FF7A7A7A" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TopMenuButton_BD_Unable" Color="#FFB6B6B6" />

    <LinearGradientBrush x:Key="LogoutBtn_InnerBG_MouseOver" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FF75D5ED" />
        <GradientStop Offset="1" Color="#FF03B5E2" />
        <GradientStop Offset="0.49" Color="#FF45C8E9" />
        <GradientStop Offset="0.5" Color="#FF00A0C8" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="LogoutBtn_BG_MouseOver" Color="#FF005C8D" />
    <SolidColorBrush x:Key="LogoutBtn_BD" Color="#FF9FBADE" />
    <LinearGradientBrush x:Key="LogoutBtn_InnerBG_Press" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FFBCE5EF" />
        <GradientStop Offset="1" Color="#FF02C5F5" />
        <GradientStop Offset="0.49" Color="#FF73D5ED" />
        <GradientStop Offset="0.5" Color="#FF02C5F5" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="LogoutBtn_BG_Press" Color="#FF02A6D0" />
    <LinearGradientBrush x:Key="LogoutBtn_InnerBG" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FF7EA5CD" />
        <GradientStop Offset="1" Color="#FF305F9D" />
        <GradientStop Offset="0.495" Color="#FF4D83B8" />
        <GradientStop Offset="0.5" Color="#FF27549D" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="LogoutBtn_BG" Color="#FF2C4566" />
    <SolidColorBrush x:Key="LogoutBtn_Shadow" Color="#FF0C1F39" />

    <Style
        x:Key="Logout_Button"
        BasedOn="{StaticResource TopButton}"
        TargetType="{x:Type Button}" />

    <!--  Login Button  -->

    <SolidColorBrush x:Key="Login_Btn_BD_Highlight" Color="#FF84ADEB" />
    <SolidColorBrush x:Key="Login_Btn_BD_Shadow" Color="#FF1E385B" />
    <SolidColorBrush x:Key="Login_Btn_BG" Color="#FF4781D3" />
    <SolidColorBrush x:Key="Login_Btn_BD_MouseOver_Highlight" Color="#FFA1E7FF" />
    <SolidColorBrush x:Key="Login_Btn_BG_MouseOver" Color="DeepSkyBlue" />
    <SolidColorBrush x:Key="Login_Btn_BD_MouseOver_Shadow" Color="#FF005B7A" />
    <SolidColorBrush x:Key="Login_Btn_BG_Press" Color="#FF85E0FF" />

    <Style x:Key="Login_Button" TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontSize" Value="24" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Foreground" Value="{DynamicResource FG_White}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Border.CornerRadius" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="BG"
                        Background="{StaticResource Login_Btn_BG}"
                        BorderBrush="{StaticResource Login_Btn_BD_Highlight}"
                        BorderThickness="2,2,0,0"
                        CornerRadius="{TemplateBinding Border.CornerRadius}"
                        Cursor="Hand"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Border
                            x:Name="Inner_BD"
                            BorderBrush="{StaticResource Login_Btn_BD_Shadow}"
                            BorderThickness="0,0,2,2"
                            CornerRadius="{TemplateBinding Border.CornerRadius}">
                            <ContentPresenter
                                x:Name="contentpresenter"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Cursor="Hand"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                <ContentPresenter.Effect>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Direction="315"
                                        ShadowDepth="1.5" />
                                </ContentPresenter.Effect>
                            </ContentPresenter>
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BG" Property="Background" Value="{StaticResource Login_Btn_BG_MouseOver}" />
                            <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource Login_Btn_BD_MouseOver_Highlight}" />
                            <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource Login_Btn_BD_MouseOver_Shadow}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BG" Property="Background" Value="{StaticResource Login_Btn_BG_Press}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BG" Property="Background" Value="{StaticResource Button_BG_Unable}" />
                            <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource Button_BD_Unable}" />
                            <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource Button_BD_Shadow_Unable}" />
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter TargetName="contentpresenter" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Direction="315"
                                        Opacity="0"
                                        ShadowDepth="1"
                                        Color="White" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>