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

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

    <Geometry x:Key="DownArrowGeometry">M 0 0 L 5 5 L 10 0 Z</Geometry>

    <SolidColorBrush x:Key="ToggleButton_BD" Color="#FF243664" />
    <SolidColorBrush x:Key="ToggleButton_BG" Color="#FF2F457F" />

    <SolidColorBrush x:Key="ToggleButton_InnerHighlight" Color="#FF9FCDED" />
    <SolidColorBrush x:Key="ToggleButton_InnerShadow" Color="#FF003A62" />
    <SolidColorBrush x:Key="ToggleButton_BG_MouseOver" Color="#FF227BB8" />

    <SolidColorBrush x:Key="ComboBox_DropDown_BG" Color="#FF2A6AB6" />
    <SolidColorBrush x:Key="ComboBox_DropDown_BD" Color="#FF0A2B58" />
    <SolidColorBrush x:Key="ComboBox_BG" Color="White" />
    <SolidColorBrush x:Key="ComboBox_BD" Color="#FF999999" />
    <SolidColorBrush x:Key="ComboBox_BD_InnerShadow" Color="#FF404040" />
    <SolidColorBrush x:Key="ComboBox_BD_InnerHighlight" Color="#FFD2D2D2" />
    <SolidColorBrush x:Key="ComboBox_BG_Unable" Color="#FFDBDBDB" />
    <SolidColorBrush x:Key="ComboBox_BD_Unable" Color="Gray" />
    <SolidColorBrush x:Key="ComboBox_BD_InnerShadow_Unable" Color="#FF838383" />
    <SolidColorBrush x:Key="ToggleButton_Login_BD" Color="#FF092B58" />
    <LinearGradientBrush x:Key="ToggleButton_Login_BG" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FF0C4277" />
        <GradientStop Offset="1" Color="#FF1373C8" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ToggleButton_Login_InnerHighlight" Color="#FF416C95" />
    <SolidColorBrush x:Key="ToggleButton_Login_InnerShadow" Color="#FF093861" />
    <SolidColorBrush x:Key="ToggleButton_Login_BD_MouseOver" Color="#FF05162c" />
    <LinearGradientBrush x:Key="ToggleButton_Login_BG_MouseOver" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FF115b9b" />
        <GradientStop Offset="1" Color="#FF1b96de" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ToggleButton_Login_InnerHighlight_MouseOver" Color="#FF457fb1" />
    <SolidColorBrush x:Key="ToggleButton_Login_InnerShadow_MouseOver" Color="#FF0d496d" />
    <SolidColorBrush x:Key="ToggleButton_ArrowBG" Color="White" />
    <SolidColorBrush x:Key="ToggleButton_BD_Unable" Color="#FF868686" />
    <LinearGradientBrush x:Key="ToggleButton_BG_Unable" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FFB1B1B1" />
        <GradientStop Offset="1" Color="#FFDADADA" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ToggleButton_InnerHighlight_Unable" Color="#FFD8D8D8" />
    <SolidColorBrush x:Key="ToggleButton_InnerShadow_Unable" Color="#FF6C6C6C" />
    <SolidColorBrush x:Key="ComboBox_DropDown_Login_BG" Color="#FF2A6AB6" />
    <SolidColorBrush x:Key="ComboBox_DropDown_Login_BD" Color="#FF0A2B58" />
    <SolidColorBrush x:Key="ComboBox_Login_BG" Color="#FF1e4f8a" />
    <SolidColorBrush x:Key="ComboBox_Login_BD" Color="#FF092b58" />

    <!--  Toggle Button Style  -->

    <Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="BorderBrush" Value="{DynamicResource ToggleButton_BD}" />
        <Setter Property="Background" Value="{DynamicResource ToggleButton_BG}" />
        <Setter Property="Border.CornerRadius" Value="3" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Background="#00FFFFFF">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="25" />
                        </Grid.ColumnDefinitions>
                        <Border
                            x:Name="BG"
                            Grid.Column="1"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1"
                            CornerRadius="{TemplateBinding Border.CornerRadius}"
                            Cursor="Hand"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Border
                                x:Name="InnerBD_Highlight"
                                Grid.Column="1"
                                BorderBrush="{DynamicResource ToggleButton_InnerHighlight}"
                                BorderThickness="1,1,0,0"
                                CornerRadius="2">
                                <Border
                                    x:Name="InnerBD_Shadow"
                                    BorderBrush="{DynamicResource ToggleButton_InnerShadow}"
                                    BorderThickness="0,0,1,1"
                                    CornerRadius="2">
                                    <Path
                                        x:Name="Arrow"
                                        Grid.Column="1"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Cursor="Hand"
                                        Data="{StaticResource DownArrowGeometry}"
                                        Fill="{DynamicResource ToggleButton_ArrowBG}">
                                        <Path.Effect>
                                            <DropShadowEffect BlurRadius="0" ShadowDepth="1" />
                                        </Path.Effect>
                                    </Path>
                                </Border>
                            </Border>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource ToggleButton_BD_Unable}" />
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_Unable}" />
                            <Setter TargetName="Arrow" Property="Fill" Value="#FF999999" />
                            <Setter TargetName="Arrow" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Opacity="0"
                                        ShadowDepth="1" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="InnerBD_Shadow" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerShadow_Unable}" />
                            <Setter TargetName="InnerBD_Highlight" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerHighlight_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="BorderBrush" Value="{DynamicResource ToggleButton_BD}" />
        <Setter Property="Background" Value="{DynamicResource ToggleButton_BG}" />
        <Setter Property="Border.CornerRadius" Value="3" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border
                        x:Name="BG"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0"
                        CornerRadius="{TemplateBinding Border.CornerRadius}"
                        Cursor="Hand"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Grid>
                            <Border
                                x:Name="InnerBD_Highlight"
                                BorderBrush="{DynamicResource ToggleButton_InnerHighlight}"
                                BorderThickness="2,2,0,0"
                                CornerRadius="2">
                                <Border
                                    x:Name="InnerBD_Shadow"
                                    BorderBrush="{DynamicResource ToggleButton_InnerShadow}"
                                    BorderThickness="0,0,2,2"
                                    CornerRadius="2" />
                            </Border>
                            <Path
                                x:Name="Arrow"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Cursor="Hand"
                                Data="{StaticResource DownArrowGeometry}"
                                Fill="{DynamicResource ToggleButton_ArrowBG}">
                                <Path.Effect>
                                    <DropShadowEffect BlurRadius="0" ShadowDepth="1" />
                                </Path.Effect>
                            </Path>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource ToggleButton_BD_Unable}" />
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_Unable}" />
                            <Setter TargetName="Arrow" Property="Fill" Value="#FF999999" />
                            <Setter TargetName="Arrow" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Opacity="0"
                                        ShadowDepth="1" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="InnerBD_Shadow" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerShadow_Unable}" />
                            <Setter TargetName="InnerBD_Highlight" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerHighlight_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <ScrollViewer
                        x:Name="PART_ContentHost"
                        Background="Transparent"
                        Focusable="false"
                        HorizontalScrollBarVisibility="Hidden"
                        VerticalScrollBarVisibility="Hidden" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
        <Border
            x:Name="Bd"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            SnapsToDevicePixels="true">
            <Border BorderBrush="Gray" BorderThickness="0,0,1,1">
                <Grid x:Name="Placement" SnapsToDevicePixels="true">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="25" />
                    </Grid.ColumnDefinitions>
                    <Popup
                        x:Name="PART_Popup"
                        Grid.ColumnSpan="2"
                        AllowsTransparency="true"
                        IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                        Placement="Bottom"
                        PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                        <Border
                            x:Name="DropDownBorder"
                            Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                            BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
                            BorderThickness="1">
                            <ScrollViewer x:Name="DropDownScrollViewer">
                                <Grid RenderOptions.ClearTypeHint="Enabled">
                                    <Canvas
                                        Width="0"
                                        Height="0"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top">
                                        <Rectangle
                                            x:Name="OpaqueRect"
                                            Width="{Binding ActualWidth, ElementName=DropDownBorder}"
                                            Height="{Binding ActualHeight, ElementName=DropDownBorder}"
                                            Fill="{Binding Background, ElementName=DropDownBorder}" />
                                    </Canvas>
                                    <ItemsPresenter
                                        x:Name="ItemsPresenter"
                                        KeyboardNavigation.DirectionalNavigation="Contained"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </Grid>
                            </ScrollViewer>
                        </Border>
                    </Popup>
                    <TextBox
                        x:Name="PART_EditableTextBox"
                        Margin="{TemplateBinding Padding}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                        Style="{StaticResource ComboBoxEditableTextBox}" />
                    <ToggleButton
                        Grid.Column="1"
                        Margin="1,1,0,0"
                        IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        Style="{StaticResource ComboBoxToggleButton}" />
                </Grid>
            </Border>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="true">
                <Setter Property="Foreground" Value="Black" />
            </Trigger>
            <Trigger Property="IsDropDownOpen" Value="true" />
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="DropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                <Setter Property="Background" Value="#FFF4F4F4" />
            </Trigger>
            <Trigger Property="IsGrouping" Value="true">
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true" />
            <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
                <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--  ComboBox Style  -->

    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
        <Setter Property="Background" Value="{DynamicResource ComboBox_BG}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ComboBox_BD}" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Padding" Value="4,3" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Grid x:Name="MainGrid" SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
                        </Grid.ColumnDefinitions>
                        <Popup
                            x:Name="PART_Popup"
                            Grid.ColumnSpan="2"
                            AllowsTransparency="True"
                            Focusable="False"
                            IsOpen="{TemplateBinding IsDropDownOpen}"
                            Placement="Bottom"
                            PopupAnimation="Fade"
                            VerticalOffset="2">
                            <Border
                                x:Name="DropDownBorder"
                                MinWidth="{TemplateBinding ActualWidth}"
                                MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
                                BorderThickness="1">
                                <ScrollViewer x:Name="DropDownScrollViewer" Margin="0,5">
                                    <Grid RenderOptions.ClearTypeHint="Enabled">
                                        <Canvas
                                            Width="0"
                                            Height="0"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top">
                                            <Rectangle
                                                x:Name="OpaqueRect"
                                                Width="{Binding ActualWidth, ElementName=DropDownBorder}"
                                                Height="{Binding ActualHeight, ElementName=DropDownBorder}"
                                                Fill="{Binding Background, ElementName=DropDownBorder}" />
                                        </Canvas>
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </Grid>
                                </ScrollViewer>
                            </Border>
                            <Popup.Effect>
                                <DropShadowEffect Color="#71000000" />
                            </Popup.Effect>
                        </Popup>
                        <Border
                            x:Name="Bd"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="true">
                            <Border
                                x:Name="InnerBD_Shadow"
                                BorderBrush="{DynamicResource ComboBox_BD_InnerShadow}"
                                BorderThickness="1,1,0,0">
                                <Border
                                    x:Name="InnerBD_Highlight"
                                    BorderBrush="{DynamicResource ComboBox_BD_InnerHighlight}"
                                    BorderThickness="0,0,1,1" />
                            </Border>
                        </Border>
                        <ToggleButton
                            x:Name="ToggleButton"
                            Grid.ColumnSpan="2"
                            Margin="2"
                            Cursor="Hand"
                            IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            Style="{StaticResource ComboBoxReadonlyToggleButton}" />
                        <ContentPresenter
                            Margin="4,3,20,3"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="Center"
                            Content="{TemplateBinding SelectionBoxItem}"
                            ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                            ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                            ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                            IsHitTestVisible="false"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="DropDownBorder" Property="Height" Value="95" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBox_BG_Unable}" />
                            <Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource ComboBox_BD_Unable}" />
                            <Setter TargetName="InnerBD_Shadow" Property="BorderBrush" Value="{DynamicResource ComboBox_BD_InnerShadow_Unable}" />
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                        <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
                            <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                            <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="BorderBrush" Value="Black" />
                <Setter Property="Background" Value="White" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Padding" Value="3" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <SolidColorBrush x:Key="TopToggleButton_BD" Color="#FF243664" />
    <SolidColorBrush x:Key="TopToggleButton_BG" Color="#FF2F457F" />
    <SolidColorBrush x:Key="TopToggleButton_InnerHighlight" Color="#FF9FCDED" />
    <SolidColorBrush x:Key="TopToggleButton_InnerShadow" Color="#FF003A62" />
    <SolidColorBrush x:Key="TopToggleButton_BG_MouseOver" Color="#FF227BB8" />
    <SolidColorBrush x:Key="TopComboBox_BG" Color="#FFC8E8FF" />
    <SolidColorBrush x:Key="TopComboBox_BD" Color="#B2AFC2D3" />

    <!--  Top Toggle Button Style  -->

    <Style x:Key="TopComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="BorderBrush" Value="{DynamicResource TopToggleButton_BD}" />
        <Setter Property="Background" Value="{DynamicResource TopToggleButton_BG}" />
        <Setter Property="Border.CornerRadius" Value="3" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Background="#00FFFFFF">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="25" />
                        </Grid.ColumnDefinitions>
                        <Border
                            x:Name="BG"
                            Grid.Column="1"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1"
                            CornerRadius="{TemplateBinding Border.CornerRadius}"
                            Cursor="Hand"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Border
                                x:Name="InnerBD_Highlight"
                                BorderBrush="{DynamicResource TopToggleButton_InnerHighlight}"
                                BorderThickness="1,1,0,0"
                                CornerRadius="2">
                                <Border
                                    x:Name="InnerBD_Shadow"
                                    BorderBrush="{DynamicResource TopToggleButton_InnerShadow}"
                                    BorderThickness="0,0,1,1"
                                    CornerRadius="2">
                                    <Path
                                        x:Name="Arrow"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Cursor="Hand"
                                        Data="{StaticResource DownArrowGeometry}"
                                        Fill="{DynamicResource ToggleButton_ArrowBG}" />
                                </Border>
                            </Border>
                        </Border>

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource TopToggleButton_BG_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource ToggleButton_BD_Unable}" />
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_Unable}" />
                            <Setter TargetName="Arrow" Property="Fill" Value="#FF999999" />
                            <Setter TargetName="Arrow" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Opacity="0"
                                        ShadowDepth="1" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="InnerBD_Shadow" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerShadow_Unable}" />
                            <Setter TargetName="InnerBD_Highlight" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerHighlight_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TopComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="BorderBrush" Value="{DynamicResource ToggleButton_BD}" />
        <Setter Property="Background" Value="{DynamicResource ToggleButton_BG}" />
        <Setter Property="Border.CornerRadius" Value="3" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border
                        x:Name="BG"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0"
                        CornerRadius="{TemplateBinding Border.CornerRadius}"
                        Cursor="Hand"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Grid>
                            <Border
                                x:Name="InnerBD_Highlight"
                                BorderBrush="{DynamicResource ToggleButton_InnerHighlight}"
                                BorderThickness="2,2,0,0"
                                CornerRadius="2">
                                <Border
                                    x:Name="InnerBD_Shadow"
                                    BorderBrush="{DynamicResource ToggleButton_InnerShadow}"
                                    BorderThickness="0,0,2,2"
                                    CornerRadius="2" />
                            </Border>
                            <Path
                                x:Name="Arrow"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Cursor="Hand"
                                Data="{StaticResource DownArrowGeometry}"
                                Fill="{DynamicResource ToggleButton_ArrowBG}">
                                <Path.Effect>
                                    <DropShadowEffect BlurRadius="0" ShadowDepth="1" />
                                </Path.Effect>
                            </Path>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource ToggleButton_BD_Unable}" />
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_Unable}" />
                            <Setter TargetName="Arrow" Property="Fill" Value="#FF999999" />
                            <Setter TargetName="Arrow" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Opacity="0"
                                        ShadowDepth="1" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="InnerBD_Shadow" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerShadow_Unable}" />
                            <Setter TargetName="InnerBD_Highlight" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerHighlight_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TopComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <ScrollViewer
                        x:Name="PART_ContentHost"
                        Background="Transparent"
                        Focusable="false"
                        HorizontalScrollBarVisibility="Hidden"
                        VerticalScrollBarVisibility="Hidden" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="TopComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
        <Border
            x:Name="Bd"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            SnapsToDevicePixels="true">
            <Border BorderBrush="Gray" BorderThickness="0,0,1,1">
                <Grid x:Name="Placement" SnapsToDevicePixels="true">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="25" />
                    </Grid.ColumnDefinitions>
                    <Popup
                        x:Name="PART_Popup"
                        Grid.ColumnSpan="2"
                        AllowsTransparency="true"
                        IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
                        Placement="Bottom"
                        PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                        <Border
                            x:Name="DropDownBorder"
                            Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                            BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
                            BorderThickness="1">
                            <ScrollViewer x:Name="DropDownScrollViewer">
                                <Grid RenderOptions.ClearTypeHint="Enabled">
                                    <Canvas
                                        Width="0"
                                        Height="0"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top">
                                        <Rectangle
                                            x:Name="OpaqueRect"
                                            Width="{Binding ActualWidth, ElementName=DropDownBorder}"
                                            Height="{Binding ActualHeight, ElementName=DropDownBorder}"
                                            Fill="{Binding Background, ElementName=DropDownBorder}" />
                                    </Canvas>
                                    <ItemsPresenter
                                        x:Name="ItemsPresenter"
                                        KeyboardNavigation.DirectionalNavigation="Contained"
                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </Grid>
                            </ScrollViewer>
                        </Border>
                    </Popup>
                    <TextBox
                        x:Name="PART_EditableTextBox"
                        Margin="{TemplateBinding Padding}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                        Style="{StaticResource ComboBoxEditableTextBox}" />
                    <ToggleButton
                        Grid.Column="1"
                        Margin="1,1,0,0"
                        IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        Style="{StaticResource ComboBoxToggleButton}" />
                </Grid>
            </Border>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="true">
                <Setter Property="Foreground" Value="Black" />
            </Trigger>
            <Trigger Property="IsDropDownOpen" Value="true" />
            <Trigger Property="HasItems" Value="false">
                <Setter TargetName="DropDownBorder" Property="Height" Value="95" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                <Setter Property="Background" Value="#FFF4F4F4" />
            </Trigger>
            <Trigger Property="IsGrouping" Value="true">
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </Trigger>
            <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true" />
            <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
                <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--  Top ComboBox Style  -->

    <Style x:Key="Top_ComboBox" TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
        <Setter Property="Background" Value="{DynamicResource TopComboBox_BG}" />
        <Setter Property="BorderBrush" Value="{DynamicResource TopComboBox_BD}" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Margin" Value="0,2,2,2" />
        <Setter Property="Padding" Value="4,3" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Grid x:Name="MainGrid" SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
                        </Grid.ColumnDefinitions>
                        <Popup
                            x:Name="PART_Popup"
                            Grid.ColumnSpan="2"
                            AllowsTransparency="True"
                            Focusable="False"
                            IsOpen="{TemplateBinding IsDropDownOpen}"
                            Placement="Bottom"
                            PopupAnimation="Fade"
                            VerticalOffset="2">
                            <Border
                                x:Name="DropDownBorder"
                                MinWidth="{TemplateBinding ActualWidth}"
                                MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
                                BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
                                BorderThickness="1">
                                <ScrollViewer x:Name="DropDownScrollViewer" Margin="0,5">
                                    <Grid RenderOptions.ClearTypeHint="Enabled">
                                        <Canvas
                                            Width="0"
                                            Height="0"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top">
                                            <Rectangle
                                                x:Name="OpaqueRect"
                                                Width="{Binding ActualWidth, ElementName=DropDownBorder}"
                                                Height="{Binding ActualHeight, ElementName=DropDownBorder}"
                                                Fill="{Binding Background, ElementName=DropDownBorder}" />
                                        </Canvas>
                                        <ItemsPresenter
                                            x:Name="ItemsPresenter"
                                            KeyboardNavigation.DirectionalNavigation="Contained"
                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                    </Grid>
                                </ScrollViewer>
                            </Border>
                            <Popup.Effect>
                                <DropShadowEffect Color="#71000000" />
                            </Popup.Effect>
                        </Popup>
                        <Border
                            x:Name="Bd"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="0,6,6,0"
                            SnapsToDevicePixels="true" />
                        <ToggleButton
                            x:Name="ToggleButton"
                            Grid.ColumnSpan="2"
                            Margin="3,2"
                            Cursor="Hand"
                            IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            Style="{StaticResource TopComboBoxReadonlyToggleButton}" />
                        <ContentPresenter
                            Margin="4,3,20,3"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="Center"
                            Content="{TemplateBinding SelectionBoxItem}"
                            ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                            ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                            ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                            IsHitTestVisible="false"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="DropDownBorder" Property="Height" Value="95" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource ComboBox_BG_Unable}" />
                            <Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource ComboBox_BD_Unable}" />
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                        <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
                            <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                            <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="BorderBrush" Value="Black" />
                <Setter Property="Background" Value="White" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Padding" Value="3" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--  Login ComboBox Style  -->

    <Style x:Key="ComboBoxReadonlyToggleButton_Login" TargetType="{x:Type ToggleButton}">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="BorderBrush" Value="{DynamicResource ToggleButton_Login_BD}" />
        <Setter Property="Background" Value="{DynamicResource ToggleButton_Login_BG}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border
                        x:Name="BG"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Cursor="Hand"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Grid>
                            <Border
                                x:Name="InnerBD_Highlight"
                                BorderBrush="{DynamicResource ToggleButton_Login_InnerHighlight}"
                                BorderThickness="1.5,1.5,0,0">
                                <Border
                                    x:Name="InnerBD_Shadow"
                                    BorderBrush="{DynamicResource ToggleButton_Login_InnerShadow}"
                                    BorderThickness="0,0,1.5,1.5" />
                            </Border>
                            <Path
                                x:Name="Arrow"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Cursor="Hand"
                                Data="{StaticResource DownArrowGeometry}"
                                Fill="{DynamicResource ToggleButton_ArrowBG}">
                                <Path.Effect>
                                    <DropShadowEffect BlurRadius="0" ShadowDepth="1" />
                                </Path.Effect>
                            </Path>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource ToggleButton_Login_BD_MouseOver}" />
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_Login_BG_MouseOver}" />
                            <Setter TargetName="InnerBD_Shadow" Property="BorderBrush" Value="{DynamicResource ToggleButton_Login_InnerShadow_MouseOver}" />
                            <Setter TargetName="InnerBD_Highlight" Property="BorderBrush" Value="{DynamicResource ToggleButton_Login_InnerHighlight_MouseOver}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource ToggleButton_BD_Unable}" />
                            <Setter TargetName="BG" Property="Background" Value="{DynamicResource ToggleButton_BG_Unable}" />
                            <Setter TargetName="Arrow" Property="Fill" Value="#FF999999" />
                            <Setter TargetName="Arrow" Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect
                                        BlurRadius="0"
                                        Opacity="0"
                                        ShadowDepth="1" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="InnerBD_Shadow" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerShadow_Unable}" />
                            <Setter TargetName="InnerBD_Highlight" Property="BorderBrush" Value="{DynamicResource ToggleButton_InnerHighlight_Unable}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Login_ComboBox" TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
        <Setter Property="Foreground" Value="{DynamicResource FG_White}" />
        <Setter Property="Background" Value="{DynamicResource ComboBox_Login_BG}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ComboBox_Login_BD}" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Padding" Value="4,3" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Border
                        x:Name="Bd"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true">
                        <Grid x:Name="MainGrid" SnapsToDevicePixels="true">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="30" />
                            </Grid.ColumnDefinitions>
                            <Popup
                                x:Name="PART_Popup"
                                Grid.ColumnSpan="2"
                                AllowsTransparency="True"
                                Focusable="False"
                                IsOpen="{TemplateBinding IsDropDownOpen}"
                                Placement="Bottom"
                                PopupAnimation="Fade"
                                VerticalOffset="2">
                                <Border
                                    x:Name="DropDownBorder"
                                    MinWidth="{TemplateBinding ActualWidth}"
                                    MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                    Background="{DynamicResource ComboBox_DropDown_Login_BG}"
                                    BorderBrush="{DynamicResource ComboBox_DropDown_Login_BD}"
                                    BorderThickness="1">
                                    <ScrollViewer x:Name="DropDownScrollViewer" Margin="0,5">
                                        <Grid RenderOptions.ClearTypeHint="Enabled">
                                            <Canvas
                                                Width="0"
                                                Height="0"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                                <Rectangle
                                                    x:Name="OpaqueRect"
                                                    Width="{Binding ActualWidth, ElementName=DropDownBorder}"
                                                    Height="{Binding ActualHeight, ElementName=DropDownBorder}"
                                                    Fill="{Binding Background, ElementName=DropDownBorder}" />
                                            </Canvas>
                                            <ItemsPresenter
                                                x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                        </Grid>
                                    </ScrollViewer>
                                </Border>
                                <Popup.Effect>
                                    <DropShadowEffect Color="#71000000" />
                                </Popup.Effect>
                            </Popup>
                            <ToggleButton
                                Grid.Column="1"
                                Margin="1"
                                IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                Style="{StaticResource ComboBoxReadonlyToggleButton_Login}" />
                            <ContentPresenter
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="Center"
                                Content="{TemplateBinding SelectionBoxItem}"
                                ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                                ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                                ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                IsHitTestVisible="false"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="DropDownBorder" Property="Height" Value="95" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter TargetName="Bd" Property="Background" Value="#FFDBDBDB" />
                            <Setter TargetName="Bd" Property="BorderBrush" Value="Gray" />
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                        <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
                            <Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                            <Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="BorderBrush" Value="Black" />
                <Setter Property="Background" Value="White" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Padding" Value="3" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>