<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:System="clr-namespace:System;assembly=mscorlib"
                    xmlns:Themes="clr-namespace:Xceed.Wpf.Toolkit.Themes;assembly=Xceed.Wpf.Toolkit"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                    mc:Ignorable="d">


    <!--  SelectedBackgroundBrush is used for the Selected item in ListBoxItem, ComboBoxItem  -->
    <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD" />

    <!--  Disabled Brushes are used for the Disabled look of each control  -->
    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
    <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
    <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />

    <!--  Used for background of ScrollViewer, TreeView, ListBox, Expander, TextBox, Tab Control  -->
    <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />

    <!--  DefaultedBorderBrush is used to show KeyBoardFocus  -->
    <LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0.0" Color="#777" />
        <GradientStop Offset="1.0" Color="#000" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
    <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
    <SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />

    <Style x:Key="CheckBoxStyle" TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Margin" Value="{DynamicResource CheckBoxMargin}" />
        <Setter Property="BorderThickness" Value="{DynamicResource CheckBoxBorderThickness}" />
        <Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
        <Setter Property="Background" Value="{DynamicResource CheckBoxBG}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxBorder}" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <!--  BulletDecorator is used to provide baseline alignment between the checkmark and the Content  -->
                    <BulletDecorator>
                        <BulletDecorator.Bullet>
                            <Grid x:Name="grid"
                                  Width="{DynamicResource CheckBoxIndicatorSize}"
                                  Height="{DynamicResource CheckBoxIndicatorSize}">
                                <Border x:Name="Border"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="{DynamicResource CheckBoxCornerRadius}"
                                        Padding="1">
                                    <Rectangle x:Name="CheckMark"
                                               Fill="{DynamicResource IconCheckBoxIndicator}"
                                               SnapsToDevicePixels="True" />
                                </Border>
                            </Grid>
                        </BulletDecorator.Bullet>
                        <ContentPresenter x:Name="ContentPresenter"
                                          Margin="{DynamicResource CheckBoxContentPresenterMargin}"
                                          HorizontalAlignment="{DynamicResource CheckBoxContentPresenterHAlignment}"
                                          VerticalAlignment="{DynamicResource CheckBoxContentPresenterVAlignment}"
                                          RecognizesAccessKey="True" />
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource CheckBoxBGHover}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderHover}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource CheckBoxBGPressed}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderPressed}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource CheckBoxBGDisabled}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderDisabled}" />
                            <Setter TargetName="CheckMark" Property="Opacity" Value="{DynamicResource ControlDisabled}" />
                            <Setter TargetName="ContentPresenter" Property="Opacity" Value="{DynamicResource ControlDisabled}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="GroupBoxStyle" TargetType="{x:Type GroupBox}">
        <Setter Property="BorderBrush" Value="{DynamicResource GroupBoxBorder}" />
        <Setter Property="Background" Value="{DynamicResource GroupBoxBG}" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupBox}">
                    <Grid SnapsToDevicePixels="true">
                        <Border Margin="0,18,0,0"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="3" />
                        <Border x:Name="Header">
                            <ContentPresenter ContentSource="Header"
                                              RecognizesAccessKey="True"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                        <ContentPresenter Margin="10,27,10,10" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  button style for text and icon  -->
    <Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{DynamicResource ButtonBG}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorder}" />
        <Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Height" Value="23" />
        <Setter Property="MinWidth" Value="22" />
        <Setter Property="Foreground" Value="{DynamicResource DefaultFontColor}" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
        <Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}" />
        <Setter Property="Margin" Value="4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid x:Name="Grid">
                        <Border x:Name="Shadow"
                                Margin="2,2,2,0"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2">
                            <Border.Effect>
                                <DropShadowEffect BlurRadius="3"
                                                  Direction="-90"
                                                  Opacity="0.35"
                                                  ShadowDepth="1" />
                            </Border.Effect>
                        </Border>
                        <Border x:Name="Border"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="2"
                                Padding="{DynamicResource ButtonContentPresenterMargin}">
                            <ContentPresenter x:Name="ContentPresenter"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              RecognizesAccessKey="True" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <!--Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" />
                        </Trigger-->
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource ButtonBGHover}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderHover}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource ButtonBGPressed}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderPressed}" />
                            <Setter TargetName="Shadow" Property="Visibility" Value="Hidden" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource ButtonBGDisabled}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderDisabled}" />
                            <Setter TargetName="ContentPresenter" Property="Opacity" Value="{DynamicResource ControlDisabled}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  IntegerUpDownStyle - made of 3 templates  -->
    <Style x:Key="IntegerUpDownStyle" TargetType="{x:Type xctk:IntegerUpDown}">
        <Setter Property="Background" Value="{DynamicResource IntegerUpDownBG}" />
        <Setter Property="BorderBrush" Value="{DynamicResource IntegerUpDownBorder}" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="BorderThickness" Value="1,1,1,2" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Foreground" Value="{DynamicResource DefaultFontColor}" />
        <Setter Property="HorizontalContentAlignment" Value="Right" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="TextAlignment" Value="Right" />
        <Setter Property="WatermarkTemplate">
            <Setter.Value>
                <DataTemplate>
                    <ContentControl Margin="0,0,3,0"
                                    Content="{Binding}"
                                    Focusable="False"
                                    Foreground="Gray" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type xctk:IntegerUpDown}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="True">
                        <xctk:ButtonSpinner x:Name="PART_Spinner"
                                            HorizontalContentAlignment="Stretch"
                                            VerticalContentAlignment="Stretch"
                                            AllowSpin="{Binding AllowSpin,
                                                                RelativeSource={RelativeSource TemplatedParent}}"
                                            ButtonSpinnerLocation="{Binding ButtonSpinnerLocation,
                                                                            RelativeSource={RelativeSource TemplatedParent}}"
                                            IsTabStop="False"
                                            ShowButtonSpinner="{Binding ShowButtonSpinner,
                                                                        RelativeSource={RelativeSource TemplatedParent}}"
                                            Style="{DynamicResource IntegerUpDownButtonSpinnerStyle}">
                            <xctk:WatermarkTextBox x:Name="PART_TextBox"
                                                   MinWidth="20"
                                                   HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                   VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                                   AcceptsReturn="False"
                                                   AutoMoveFocus="{Binding AutoMoveFocus,
                                                                           RelativeSource={RelativeSource TemplatedParent}}"
                                                   AutoSelectBehavior="{Binding AutoSelectBehavior,
                                                                                RelativeSource={RelativeSource TemplatedParent}}"
                                                   Background="Transparent"
                                                   BorderThickness="0"
                                                   ContextMenu="{TemplateBinding ContextMenu}"
                                                   FontFamily="{TemplateBinding FontFamily}"
                                                   FontSize="{TemplateBinding FontSize}"
                                                   FontStretch="{TemplateBinding FontStretch}"
                                                   FontStyle="{TemplateBinding FontStyle}"
                                                   FontWeight="{TemplateBinding FontWeight}"
                                                   Foreground="{TemplateBinding Foreground}"
                                                   IsTabStop="{TemplateBinding IsTabStop}"
                                                   IsUndoEnabled="True"
                                                   Padding="{TemplateBinding Padding}"
                                                   SelectAllOnGotFocus="{Binding SelectAllOnGotFocus,
                                                                                 RelativeSource={RelativeSource TemplatedParent}}"
                                                   TabIndex="{TemplateBinding TabIndex}"
                                                   TextAlignment="{Binding TextAlignment,
                                                                           RelativeSource={RelativeSource TemplatedParent}}"
                                                   TextWrapping="NoWrap"
                                                   Watermark="{Binding Watermark,
                                                                       RelativeSource={RelativeSource TemplatedParent}}"
                                                   WatermarkTemplate="{Binding WatermarkTemplate,
                                                                               RelativeSource={RelativeSource TemplatedParent}}" />
                        </xctk:ButtonSpinner>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsReadOnly, RelativeSource={RelativeSource Self}}" Value="False" />
                                <Condition Binding="{Binding AllowTextInput, RelativeSource={RelativeSource Self}}" Value="False" />
                            </MultiDataTrigger.Conditions>
                            <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
                        </MultiDataTrigger>
                        <DataTrigger Binding="{Binding IsReadOnly, RelativeSource={RelativeSource Self}}" Value="True">
                            <Setter TargetName="PART_TextBox" Property="IsReadOnly" Value="True" />
                        </DataTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="PART_TextBox" Property="Opacity" Value="{DynamicResource ControlDisabled}" />
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="PART_TextBox" Property="FocusManager.FocusedElement" Value="{Binding ElementName=PART_TextBox}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  IntegerUpDownStyle - ButtonSpinnerStyle  -->
    <Style x:Key="IntegerUpDownButtonSpinnerStyle" TargetType="{x:Type xctk:ButtonSpinner}">
        <Setter Property="Background" Value="White" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type xctk:ButtonSpinner}">
                    <Border x:Name="Border"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="True">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition x:Name="firstContentColumn" Width="*" />
                                <ColumnDefinition x:Name="secondContentColumn" Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter x:Name="contentPresenter"
                                              Margin="{TemplateBinding Padding}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              Content="{TemplateBinding Content}"
                                              Focusable="False"
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            <Grid x:Name="gridContent"
                                  Grid.Column="1"
                                  Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <Grid.Visibility>
                                    <TemplateBinding Property="ShowButtonSpinner">
                                        <TemplateBinding.Converter>
                                            <BooleanToVisibilityConverter />
                                        </TemplateBinding.Converter>
                                    </TemplateBinding>
                                </Grid.Visibility>
                                <RepeatButton x:Name="PART_IncreaseButton"
                                              IsTabStop="{TemplateBinding IsTabStop}"
                                              Style="{DynamicResource IntegerUpDownRepeatButtonStyle}">
                                    <RepeatButton.ContentTemplate>
                                        <DataTemplate>
                                            <Path Width="6"
                                                  Height="4"
                                                  HorizontalAlignment="Left"
                                                  Data="M5.375,5.3900002 L8,9.0150003 2.75,9.0150003 z"
                                                  Fill="#FF000000"
                                                  SnapsToDevicePixels="True"
                                                  Stretch="Fill" />
                                        </DataTemplate>
                                    </RepeatButton.ContentTemplate>
                                </RepeatButton>
                                <RepeatButton x:Name="PART_DecreaseButton"
                                              Grid.Row="1"
                                              IsTabStop="{TemplateBinding IsTabStop}"
                                              Style="{DynamicResource IntegerUpDownRepeatButtonStyle}">
                                    <RepeatButton.ContentTemplate>
                                        <DataTemplate>
                                            <Path Width="6"
                                                  Height="4"
                                                  HorizontalAlignment="Left"
                                                  Data="M5.375,5.3900002 L8,9.0150003 2.75,9.0150003 z"
                                                  Fill="#FF000000"
                                                  RenderTransformOrigin="0.5,0.5"
                                                  SnapsToDevicePixels="True"
                                                  Stretch="Fill">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleX="1" ScaleY="-1" />
                                                        <SkewTransform AngleX="0" AngleY="0" />
                                                        <RotateTransform Angle="0" />
                                                        <TranslateTransform />
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </DataTemplate>
                                    </RepeatButton.ContentTemplate>
                                </RepeatButton>
                            </Grid>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey ResourceId=ControlDisabledBackgroundKey, TypeInTargetAssembly={x:Type Themes:ResourceKeys}}}" />
                        </Trigger>
                        <!--<Trigger SourceName="PART_IncreaseButton" Property="IsEnabled" Value="False">
                            <Setter TargetName="PART_IncreaseButton" Property="ContentTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <Path Width="6"
                                              Height="4"
                                              HorizontalAlignment="Left"
                                              Data="M5.375,5.3900002 L8,9.0150003 2.75,9.0150003 z"
                                              Fill="#FF000000"
                                              SnapsToDevicePixels="True"
                                              Stretch="Fill" />
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger SourceName="PART_DecreaseButton" Property="IsEnabled" Value="False">
                            <Setter TargetName="PART_DecreaseButton" Property="ContentTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <Path Width="6"
                                              Height="4"
                                              HorizontalAlignment="Left"
                                              Data="M5.375,5.3900002 L8,9.0150003 2.75,9.0150003 z"
                                              Fill="#FF000000"
                                              RenderTransformOrigin="0.5,0.5"
                                              SnapsToDevicePixels="True"
                                              Stretch="Fill">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform ScaleX="1" ScaleY="-1" />
                                                    <SkewTransform AngleX="0" AngleY="0" />
                                                    <RotateTransform Angle="0" />
                                                    <TranslateTransform />
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                        </Trigger>-->
                        <Trigger Property="ButtonSpinnerLocation" Value="Left">
                            <Setter TargetName="firstContentColumn" Property="Width" Value="Auto" />
                            <Setter TargetName="secondContentColumn" Property="Width" Value="*" />
                            <Setter TargetName="contentPresenter" Property="Grid.Column" Value="1" />
                            <Setter TargetName="gridContent" Property="Grid.Column" Value="0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="IntegerUpDownRepeatButtonStyle"
           d:IsControlPart="True"
           BasedOn="{x:Null}"
           TargetType="{x:Type RepeatButton}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Grid>
                        <Border x:Name="Border"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}" />
                        <ContentPresenter x:Name="ContentPresenter"
                                          HorizontalAlignment="Center"
                                          VerticalAlignment="Center"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                          Opacity="0.7" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <!--<Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" />
                        </Trigger>-->
                        <Trigger Property="IsMouseOver" Value="true" />
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="ContentPresenter" Property="Opacity" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="ContentPresenter" Property="Opacity" Value="{DynamicResource ControlDisabled}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  default text style  -->
    <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="TextTrimming" Value="None" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
        <Setter Property="FontStretch" Value="Expanded" />
    </Style>

    <!--  default text style w/ char ellipse  -->
    <Style x:Key="TextBlockStyleCharacterEllipsis" TargetType="{x:Type TextBlock}">
        <Setter Property="TextWrapping" Value="NoWrap" />
        <Setter Property="TextTrimming" Value="CharacterEllipsis" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
    </Style>

    <!--  small label/caption text style  -->
    <Style x:Key="TextBlockStyleSmall" TargetType="{x:Type TextBlock}">
        <Setter Property="TextWrapping" Value="NoWrap" />
        <Setter Property="TextTrimming" Value="CharacterEllipsis" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSizeSmall}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamilySmall}" />
   </Style>

   <!--  default text style  -->
   <Style x:Key="ComboBoxStyle" TargetType="{x:Type ComboBox}">
      <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
      <Setter Property="FontWeight" Value="Normal" />
      <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
      <Setter Property="FontStretch" Value="Expanded" />
   </Style>

   <Style TargetType="{x:Type ListBoxItem}">
      <Setter Property="Background" Value="Transparent" />
      <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="Padding" Value="12,0,0,0" />
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type ListBoxItem}">
               <Border x:Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                  <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsSelected" Value="true">
                     <Setter TargetName="Bd" Property="Background" Value="#4da8d3" />
                     <Setter Property="Foreground" Value="White" />
                  </Trigger>
                  <MultiTrigger>
                     <MultiTrigger.Conditions>
                        <Condition Property="IsSelected" Value="true" />
                        <Condition Property="Selector.IsSelectionActive" Value="false" />
                     </MultiTrigger.Conditions>
                     <Setter TargetName="Bd" Property="Background" Value="#4da8d3" />
                     <Setter Property="Foreground" Value="White" />
                  </MultiTrigger>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <Style TargetType="{x:Type ComboBoxItem}">
      <Setter Property="Background" Value="Transparent" />
      <Setter Property="Padding" Value="12,0,0,0" />
      <Setter Property="FontWeight" Value="Normal" />
      <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}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsSelected" Value="true">
                     <Setter TargetName="Bd" Property="Background" Value="#4da8d3" />
                     <Setter Property="Foreground" Value="White" />
                  </Trigger>
                  <MultiTrigger>
                     <MultiTrigger.Conditions>
                        <Condition Property="IsSelected" Value="true" />
                        <Condition Property="Selector.IsSelectionActive" Value="false" />
                     </MultiTrigger.Conditions>
                     <Setter TargetName="Bd" Property="Background" Value="#4da8d3" />
                     <Setter Property="Foreground" Value="White" />
                  </MultiTrigger>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                  </Trigger>
                  <Trigger Property="IsMouseOver" Value="True">
                     <Setter TargetName="Bd" Property="Background" Value="#4da8d3" />
                     <Setter Property="Foreground" Value="White" />
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>
</ResourceDictionary>