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

    <!--#region ComboBox Template-->

    <!--#region Colors-->

    <SolidColorBrush x:Key="TextBox.Static.Background"
                     Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ComboBox.Static.Border"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBox.Static.Editable.Background"
                     Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ComboBox.Static.Editable.Border"
                     Color="#FFABADB3" />
    <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBox.MouseOver.Border"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background"
                     Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border"
                     Color="#FF7EB4EA" />

    <LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#FFEBF4FC"
                      Offset="0.0" />
        <GradientStop Color="#FFDCECFC"
                      Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border"
                     Color="#FF7EB4EA" />
    <SolidColorBrush x:Key="ComboBox.Pressed.Border"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background"
                     Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border"
                     Color="#FF569DE5" />

    <LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#FFDAEBFC"
                      Offset="0.0" />
        <GradientStop Color="#FFC4E0FC"
                      Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border"
                     Color="#FF569DE5" />
    <SolidColorBrush x:Key="ComboBox.Disabled.Border"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBox.Disabled.Glyph"
                     Color="#FFBFBFBF" />
    <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background"
                     Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border"
                     Color="#FFBFBFBF" />
    <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border"
                     Color="Transparent" />
    <!--#endregion-->

    <Style x:Key="FocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="2"
                               StrokeDashArray="1 2"
                               Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                               SnapsToDevicePixels="true"
                               StrokeThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!--#region ComboBox default-->

    <Style x:Key="ComboBoxToggleButton"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="OverridesDefaultStyle"
                Value="true" />
        <Setter Property="IsTabStop"
                Value="false" />
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="ClickMode"
                Value="Press" />
        <Setter Property="Border.CornerRadius"
                Value="7.5" />
        <Setter Property="Border.BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border x:Name="templateRoot"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{TemplateBinding Border.CornerRadius}"
                            SnapsToDevicePixels="true"
                            Height="28">
                        <Border x:Name="splitBorder"
                                BorderBrush="Transparent"
                                BorderThickness="1"
                                HorizontalAlignment="Right"
                                Margin="5"
                                SnapsToDevicePixels="true"
                                Width="15">
                            <Viewbox HorizontalAlignment="Center"
                                     VerticalAlignment="Center">
                                <Path x:Name="arrow"
                                      Data="F1 M 2.89067,4.99467C 2.89067,4.22933 3.724,3.74533 4.39067,4.13067L 10.8227,7.844L 17.26,4.13067C 18.412,3.48 19.4013,5.19333 18.26,5.86533L 11.3227,9.86533C 11.016,10.0413 10.636,10.0413 10.3227,9.86533L 3.39067,5.86533C 3.07867,5.688 2.89067,5.35467 2.89067,4.99467 Z"
                                      Fill="{DynamicResource Color.Menu.Icon}" />
                            </Viewbox>
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                        </MultiDataTrigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="arrow"
                                    Value="{DynamicResource Color.Menu.Icon.Hover}" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="false" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=ComboBox}}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.MouseOver.Border}" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=ComboBox}}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.MouseOver.Border}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="arrow"
                                    Value="{DynamicResource Color.Menu.Icon.Hover}" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="false" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=ComboBox}}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Pressed.Border}" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{Binding BorderBrush, RelativeSource={RelativeSource AncestorLevel=1, AncestorType=ComboBox}}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Pressed.Border}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Fill"
                                    TargetName="arrow"
                                    Value="{StaticResource ComboBox.Disabled.Glyph}" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="false" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Disabled.Border}" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Border}" />
                            <Setter Property="Background"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}" />
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="ComboBoxTemplate"
                     TargetType="{x:Type ComboBox}">
        <Border x:Name="errorBorder" CornerRadius="7.5">
            <Grid x:Name="templateRoot"
                  SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                                      Width="0" />
                </Grid.ColumnDefinitions>

                <Popup x:Name="PART_Popup"
                       AllowsTransparency="true"
                       Grid.ColumnSpan="2"
                       IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                       Margin="1"
                       Placement="Bottom"
                       PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                    <Border MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}">
                        <Border x:Name="dropDownBorder"
                                Margin="0 7.5"
                                CornerRadius="7.5"
                                Background="{DynamicResource BackgroundColor.Menu.SubCategory}">
                            <ScrollViewer x:Name="DropDownScrollViewer">
                                <Grid x:Name="grid"
                                      RenderOptions.ClearTypeHint="Enabled">
                                    <Canvas x:Name="canvas"
                                            HorizontalAlignment="Left"
                                            Height="0"
                                            VerticalAlignment="Top"
                                            Width="0">
                                        <Border x:Name="opaqueRect"
                                                CornerRadius="7.5"
                                                Background="{Binding Background, ElementName=dropDownBorder}"
                                                Height="{Binding ActualHeight, ElementName=dropDownBorder}"
                                                Width="{Binding ActualWidth, ElementName=dropDownBorder}" />
                                    </Canvas>
                                    <ItemsPresenter x:Name="ItemsPresenter"
                                                    KeyboardNavigation.DirectionalNavigation="Contained"
                                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </Grid>
                            </ScrollViewer>
                        </Border>
                    </Border>
                </Popup>
                <ToggleButton x:Name="toggleButton"
                              Background="{TemplateBinding Background}"
                              BorderBrush="{TemplateBinding BorderBrush}"
                              BorderThickness="{TemplateBinding BorderThickness}"
                              Grid.ColumnSpan="2"
                              IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                              Style="{StaticResource ComboBoxToggleButton}" />
                <ContentPresenter x:Name="contentPresenter"
                                  ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                                  ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                                  Content="{TemplateBinding SelectionBoxItem}"
                                  ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                  IsHitTestVisible="false"
                                  Margin="{TemplateBinding Padding}"
                                  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="Tag" Value="error">
                <Setter TargetName="errorBorder" Property="BorderBrush" Value="Red"/>
                <Setter TargetName="errorBorder" Property="BorderThickness" Value="1"/>
            </Trigger>
            <Trigger Property="Tag" Value="noerror">
                <Setter TargetName="errorBorder" Property="BorderThickness" Value="0"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Opacity"
                        Value="0.7" />
            </Trigger>
            <Trigger Property="HasDropShadow"
                     SourceName="PART_Popup"
                     Value="true">
            </Trigger>
            <Trigger Property="HasItems"
                     Value="false">
                <Setter Property="Height"
                        TargetName="dropDownBorder"
                        Value="95" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping"
                               Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping"
                               Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll"
                        Value="false" />
            </MultiTrigger>
            <Trigger Property="ScrollViewer.CanContentScroll"
                     SourceName="DropDownScrollViewer"
                     Value="false">
                <Setter Property="Canvas.Top"
                        TargetName="opaqueRect"
                        Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                <Setter Property="Canvas.Left"
                        TargetName="opaqueRect"
                        Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--#endregion-->

    <!--#region ComboBoxEditable-->

    <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}">
        <Grid x:Name="templateRoot"
              SnapsToDevicePixels="true">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                                  Width="0" />
            </Grid.ColumnDefinitions>
            <Popup x:Name="PART_Popup"
                   AllowsTransparency="true"
                   Grid.ColumnSpan="2"
                   IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                   Margin="1"
                   Placement="Bottom"
                   PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                <Border MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
                        MaxHeight="{TemplateBinding MaxDropDownHeight}">
                    <Border x:Name="dropDownBorder"
                            Margin="0 7.5"
                            CornerRadius="7.5"
                            Background="{DynamicResource BackgroundColor.Menu.SubCategory}">
                        <ScrollViewer x:Name="DropDownScrollViewer">
                            <Grid x:Name="grid"
                                  RenderOptions.ClearTypeHint="Enabled">
                                <Canvas x:Name="canvas"
                                        HorizontalAlignment="Left"
                                        Height="0"
                                        VerticalAlignment="Top"
                                        Width="0">
                                    <Border x:Name="opaqueRect"
                                            CornerRadius="7.5"
                                            Background="{Binding Background, ElementName=dropDownBorder}"
                                            Height="{Binding ActualHeight, ElementName=dropDownBorder}"
                                            Width="{Binding ActualWidth, ElementName=dropDownBorder}" />
                                </Canvas>
                                <ItemsPresenter x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </Grid>
                        </ScrollViewer>
                    </Border>
                </Border>
            </Popup>
            <ToggleButton x:Name="toggleButton"
                          Background="{TemplateBinding Background}"
                          BorderBrush="{TemplateBinding BorderBrush}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          Grid.ColumnSpan="2"
                          IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                          Style="{StaticResource ComboBoxToggleButton}" />
            <Border x:Name="border"
                    Background="Transparent"
                    Margin="{TemplateBinding BorderThickness}"
                    Padding="5 0">
                <TextBox x:Name="PART_EditableTextBox"
                         HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                         IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
                         Margin="{TemplateBinding Padding}"
                         Style="{StaticResource ComboBoxEditableTextBox}"
                         VerticalContentAlignment="Center" />
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Opacity"
                        TargetName="border"
                        Value="0.56" />
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin"
                     Value="true">
                <Setter Property="Foreground"
                        Value="{DynamicResource FontColor.Menu.Categories}" />
            </Trigger>
            <Trigger Property="HasDropShadow"
                     SourceName="PART_Popup"
                     Value="true">
            </Trigger>
            <Trigger Property="HasItems"
                     Value="false">
                <Setter Property="Height"
                        TargetName="dropDownBorder"
                        Value="95" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping"
                               Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping"
                               Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll"
                        Value="false" />
            </MultiTrigger>
            <Trigger Property="ScrollViewer.CanContentScroll"
                     SourceName="DropDownScrollViewer"
                     Value="false">
                <Setter Property="Canvas.Top"
                        TargetName="opaqueRect"
                        Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                <Setter Property="Canvas.Left"
                        TargetName="opaqueRect"
                        Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--#endregion-->

    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource FocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource BackgroundColor.DetailsPage.Widget.Title}" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource BackgroundColor.Menu.MainCategory.Hover}" />
        <Setter Property="Foreground"
                Value="{DynamicResource FontColor.Menu.Categories}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="FontSize"
                Value="14" />
        <Setter Property="Border.CornerRadius"
                Value="7.5" />
        <Setter Property="FontFamily"
                Value="Calibri" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="Padding"
                Value="10 7.5" />
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="true" />
        <Setter Property="ScrollViewer.PanningMode"
                Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled"
                Value="False" />
        <Setter Property="Template"
                Value="{StaticResource ComboBoxTemplate}" />
        <Style.Triggers>
            <Trigger Property="IsEditable"
                     Value="true">
                <Setter Property="IsTabStop"
                        Value="false" />
                <Setter Property="Padding"
                        Value="2" />
                <Setter Property="Template"
                        Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--#endregion-->

    <!--#region ComboBoxItem-->

    <!--#region Colors-->

    <!--<SolidColorBrush x:Key="ComboBoxItem.ItemsviewHover.Background"
                     Color="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />-->
    <SolidColorBrush x:Key="ComboBoxItem.ItemsviewHover.Border"
                     Color="Transparent" />
    <!--<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelected.Background"
                     Color="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />-->
    <SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelected.Border"
                     Color="Transparent" />
    <!--<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedHover.Background"
                     Color="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />-->
    <SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedHover.Border"
                     Color="Transparent" />
    <!--<SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedNoFocus.Background"
                     Color="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />-->
    <SolidColorBrush x:Key="ComboBoxItem.ItemsviewSelectedNoFocus.Border"
                     Color="Transparent" />
    <SolidColorBrush x:Key="ComboBoxItem.ItemsviewFocus.Border"
                     Color="Transparent" />
    <!--<SolidColorBrush x:Key="ComboBoxItem.ItemsviewHoverFocus.Background"
                     Color="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />-->
    <SolidColorBrush x:Key="ComboBoxItem.ItemsviewHoverFocus.Border"
                     Color="Transparent" />

    <!--#endregion -->

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

    <Style x:Key="{x:Type ComboBoxItem}"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="SnapsToDevicePixels"
                Value="True" />
        <Setter Property="Padding"
                Value="10 2.5" />
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment"
                Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="Foreground"
                Value="{DynamicResource FontColor.Menu.Categories}" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource FocusVisual_Item}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border x:Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="TextElement.Foreground"
                                    TargetName="Bd"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource FontColor.Menu.Categories.Hover}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelected.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedNoFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHoverFocus.Border}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ComboBoxSingleItem"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="Padding"
                Value="10 2.5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border x:Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            CornerRadius="7.5"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="TextElement.Foreground"
                                    TargetName="Bd"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource FontColor.Menu.Categories.Hover}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelected.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedNoFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHoverFocus.Border}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ComboBoxFirstItem"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="Padding"
                Value="10 2.5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border x:Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            CornerRadius="7.5 7.5 0 0"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="TextElement.Foreground"
                                    TargetName="Bd"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource FontColor.Menu.Categories.Hover}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelected.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedNoFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHoverFocus.Border}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ComboBoxLastItem"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="Padding"
                Value="10 2.5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border x:Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            CornerRadius="0 0 7.5 7.5"
                            SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter Property="TextElement.Foreground"
                                    TargetName="Bd"
                                    Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource FontColor.Menu.Categories.Hover}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelected.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedHover.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="True" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewSelectedNoFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="False" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewFocus.Border}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected"
                                           Value="False" />
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="IsKeyboardFocused"
                                           Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="{StaticResource ComboBoxItem.ItemsviewHoverFocus.Border}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--#endregion-->
    
        
    <!--#region DarkComboBox-->

    <!--#region ComboBox Template-->

    <!--#region ComboBox default-->

    <Style x:Key="DarkComboBoxToggleButton"
           TargetType="{x:Type ToggleButton}">
        <Setter Property="OverridesDefaultStyle"
                Value="true" />
        <Setter Property="IsTabStop"
                Value="false" />
        <Setter Property="Focusable"
                Value="false" />
        <Setter Property="ClickMode"
                Value="Press" />
        <Setter Property="Border.CornerRadius"
                Value="7.5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border x:Name="templateRoot"
                            Background="{DynamicResource BackgroundColor.Menu.SubCategory}"
                            BorderBrush="{StaticResource ComboBox.Static.Border}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{TemplateBinding Border.CornerRadius}"
                            SnapsToDevicePixels="true">
                        <Border x:Name="splitBorder"
                                BorderBrush="Transparent"
                                BorderThickness="1"
                                HorizontalAlignment="Right"
                                Margin="5"
                                SnapsToDevicePixels="true"
                                Width="15">
                            <Viewbox HorizontalAlignment="Center"
                                     VerticalAlignment="Center">
                                <Path x:Name="arrow"
                                      Data="F1 M 2.89067,4.99467C 2.89067,4.22933 3.724,3.74533 4.39067,4.13067L 10.8227,7.844L 17.26,4.13067C 18.412,3.48 19.4013,5.19333 18.26,5.86533L 11.3227,9.86533C 11.016,10.0413 10.636,10.0413 10.3227,9.86533L 3.39067,5.86533C 3.07867,5.688 2.89067,5.35467 2.89067,4.99467 Z"
                                      Fill="{DynamicResource Color.Menu.Icon}" />
                            </Viewbox>
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Static.Editable.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Static.Editable.Border}" />
                            <Setter Property="Background"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Static.Editable.Button.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Static.Editable.Button.Border}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="arrow"
                                    Value="{DynamicResource Color.Menu.Icon.Hover}" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="false" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.MouseOver.Border}" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.MouseOver.Editable.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.MouseOver.Editable.Border}" />
                            <Setter Property="Background"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsPressed"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="arrow"
                                    Value="{DynamicResource Color.Menu.Icon.Hover}" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="false" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Pressed.Border}" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}"
                                           Value="true" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Pressed.Editable.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Pressed.Editable.Border}" />
                            <Setter Property="Background"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Fill"
                                    TargetName="arrow"
                                    Value="{StaticResource ComboBox.Disabled.Glyph}" />
                        </Trigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="false" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{DynamicResource BackgroundColor.Menu.SubCategory}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Disabled.Border}" />
                        </MultiDataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}"
                                           Value="false" />
                                <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"
                                           Value="true" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="templateRoot"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Border}" />
                            <Setter Property="Background"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="splitBorder"
                                    Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}" />
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="DarkComboBoxTemplate"
                     TargetType="{x:Type ComboBox}">

        <Grid x:Name="templateRoot"
              SnapsToDevicePixels="true">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
                                  Width="0" />
            </Grid.ColumnDefinitions>

            <Popup x:Name="PART_Popup"
                   AllowsTransparency="true"
                   Grid.ColumnSpan="2"
                   IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                   Margin="1"
                   Placement="Bottom"
                   PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                <Border MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
                        MaxHeight="{TemplateBinding MaxDropDownHeight}">
                    <Border x:Name="dropDownBorder"
                            Margin="0 7.5"
                            CornerRadius="7.5"
                            Background="{DynamicResource BackgroundColor.Menu.SubCategory}">
                        <ScrollViewer x:Name="DropDownScrollViewer">
                            <Grid x:Name="grid"
                                  RenderOptions.ClearTypeHint="Enabled">
                                <Canvas x:Name="canvas"
                                        HorizontalAlignment="Left"
                                        Height="0"
                                        VerticalAlignment="Top"
                                        Width="0">
                                    <Border x:Name="opaqueRect"
                                            CornerRadius="7.5"
                                            Background="{Binding Background, ElementName=dropDownBorder}"
                                            Height="{Binding ActualHeight, ElementName=dropDownBorder}"
                                            Width="{Binding ActualWidth, ElementName=dropDownBorder}" />
                                </Canvas>
                                <ItemsPresenter x:Name="ItemsPresenter"
                                                KeyboardNavigation.DirectionalNavigation="Contained"
                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </Grid>
                        </ScrollViewer>
                    </Border>
                </Border>
            </Popup>
            <ToggleButton x:Name="toggleButton"
                          Background="{TemplateBinding Background}"
                          BorderBrush="{TemplateBinding BorderBrush}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          Grid.ColumnSpan="2"
                          IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                          Style="{StaticResource DarkComboBoxToggleButton}" />
            <ContentPresenter x:Name="contentPresenter"
                              ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
                              ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                              Content="{TemplateBinding SelectionBoxItem}"
                              ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              IsHitTestVisible="false"
                              Margin="{TemplateBinding Padding}"
                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled"
                     Value="false">
                <Setter Property="Opacity"
                        Value="0.7" />
            </Trigger>
            <Trigger Property="HasDropShadow"
                     SourceName="PART_Popup"
                     Value="true">
            </Trigger>
            <Trigger Property="HasItems"
                     Value="false">
                <Setter Property="Height"
                        TargetName="dropDownBorder"
                        Value="95" />
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsGrouping"
                               Value="true" />
                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping"
                               Value="false" />
                </MultiTrigger.Conditions>
                <Setter Property="ScrollViewer.CanContentScroll"
                        Value="false" />
            </MultiTrigger>
            <Trigger Property="ScrollViewer.CanContentScroll"
                     SourceName="DropDownScrollViewer"
                     Value="false">
                <Setter Property="Canvas.Top"
                        TargetName="opaqueRect"
                        Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
                <Setter Property="Canvas.Left"
                        TargetName="opaqueRect"
                        Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--#endregion-->

    <Style x:Key="DarkComboBox"
           TargetType="{x:Type ComboBox}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource FocusVisual}" />
        <Setter Property="Background"
                Value="{DynamicResource BackgroundColor.Menu.SubCategory}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource ComboBox.Static.Border}" />
        <Setter Property="Foreground"
                Value="{DynamicResource FontColor.Menu.Categories}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="FontSize"
                Value="14" />
        <Setter Property="Border.CornerRadius"
                Value="7.5" />
        <Setter Property="FontFamily"
                Value="Calibri" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="Padding"
                Value="10 7.5" />
        <Setter Property="ScrollViewer.CanContentScroll"
                Value="true" />
        <Setter Property="ScrollViewer.PanningMode"
                Value="Both" />
        <Setter Property="Stylus.IsFlicksEnabled"
                Value="False" />
        <Setter Property="Template"
                Value="{StaticResource DarkComboBoxTemplate}" />
    </Style>

    <!--#endregion-->

    <!--#endregion-->

</ResourceDictionary>