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

  <!-- *********************************  RESOURCES  ********************************* -->
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Styles.WPF.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <!-- *********************************  BRUSHES  ********************************* -->
  <!--  Slider Brushes -->
  <SolidColorBrush x:Key="SliderThumbBackgroundBrush" Color="{StaticResource Color_005}" />
  <SolidColorBrush x:Key="SliderThumbHoverBackgroundBrush" Color="{StaticResource Color_002}" />
  <SolidColorBrush x:Key="SliderThumbPressedBackgroundBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="SliderThumbDisabledBackgroundBrush" Color="{StaticResource Color_005}" />
  <SolidColorBrush x:Key="SliderTrackDisabledOverlayBackgroundBrush" Color="{StaticResource Color_008}" />
  <SolidColorBrush x:Key="SliderThumbFocusedBorderBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="SliderTrackBackgroundBrush" Color="{StaticResource Color_003}" />
  <SolidColorBrush x:Key="SliderSelectionRangeBackgroundBrush" Color="{StaticResource Color_024}" />

  <!--  GridSplitter Brushes -->
  <SolidColorBrush x:Key="GridSplitterBackgroundBrush" Color="{StaticResource Color_008}" />
  <SolidColorBrush x:Key="GridSplitterBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="GridSplitterHoverBackgroundBrush" Color="{StaticResource Color_006}" />
  <SolidColorBrush x:Key="GridSplitterHoverBorderBrush" Color="{StaticResource Color_003}" />
  <SolidColorBrush x:Key="GridSplitterPressedBackgroundBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="GridSplitterFocusedBorderBrush" Color="{StaticResource Color_024}" />

  <!-- ProgressBar Brushes -->
  <SolidColorBrush x:Key="ProgressBarBackgroundBrush" Color="{StaticResource Color_005}" />
  <SolidColorBrush x:Key="ProgressBarForegroundBrush" Color="{StaticResource Color_024}" />
  <LinearGradientBrush x:Key="ProgressBarIndeterminateBackgroundBrush" EndPoint="0,1" MappingMode="Absolute" SpreadMethod="Repeat" StartPoint="20,1" Opacity="0.8">
    <LinearGradientBrush.Transform>
      <TransformGroup>
        <TranslateTransform X="0" />
        <SkewTransform AngleX="-30" />
      </TransformGroup>
    </LinearGradientBrush.Transform>
    <GradientStop Color="{StaticResource Color_023}" Offset="0.249" />
    <GradientStop Color="{StaticResource Color_024}" Offset=".25" />
    <GradientStop Color="{StaticResource Color_024}" Offset="0.75" />
    <GradientStop Color="{StaticResource Color_023}" Offset="0.751" />
  </LinearGradientBrush>

  <!-- Tooltip Brushes -->
  <SolidColorBrush x:Key="TooltipBackgroundBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="TooltipBorderBrush" Color="{StaticResource Color_004}" />

  <!-- Expander Brushes -->
  <SolidColorBrush x:Key="ExpanderButtonBackgroundBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="ExpanderButtonBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="ExpanderButtonHoverBackgroundBrush" Color="{StaticResource Color_007}" />
  <SolidColorBrush x:Key="ExpanderButtonHoverBorderBrush" Color="{StaticResource Color_003}" />
  <SolidColorBrush x:Key="ExpanderButtonPressedBackgroundBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ExpanderButtonPressedBorderBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ExpanderArrowHoverBorderBrush" Color="{StaticResource Color_002}" />
  <SolidColorBrush x:Key="ExpanderArrowPressedBorderBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="ExpanderDisabledForegroundBrush" Color="{StaticResource Color_007}" />
  <SolidColorBrush x:Key="ExpanderDisabledBackgroundBrush" Color="{StaticResource Color_007}" />
  <SolidColorBrush x:Key="ExpanderBackgroundBrush" Color="{StaticResource Color_009}" />

  <!-- GroupBox Brushes -->
  <SolidColorBrush x:Key="GroupBoxBorderBrush" Color="{StaticResource Color_003}" />

  <!-- PassWordBox Brushes -->
  <SolidColorBrush x:Key="PasswordBoxForegroundBrush" Color="{StaticResource Color_024}" />

  <!-- *********************************  TextBlock Style  ********************************* -->
  <Style x:Key="TextBlockStyle" TargetType="TextBlock">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="FontSize" Value="13.333" />
    <Setter Property="FontFamily" Value="Segoe UI" />
  </Style>

  <!-- *********************************  Label Style  ********************************* -->
  <Style x:Key="LabelStyle" TargetType="{x:Type Label}">
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="13.333" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
  </Style>

  <!-- *********************************  SliderRepeatButton Style  ********************************* -->
  <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="OverridesDefaultStyle" Value="true" />
    <Setter Property="Focusable" Value="false" />
    <Setter Property="IsTabStop" Value="false" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Rectangle Fill="{StaticResource TransparentBrush}" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Slider Horizontal Thumb Style  ********************************* -->
  <Style x:Key="HSliderThumbStyle" TargetType="{x:Type Thumb}">
    <Setter Property="Background" Value="{StaticResource SliderThumbBackgroundBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="MinHeight" Value="12" />
    <Setter Property="MinWidth" Value="8" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Grid>
            <Ellipse x:Name="ThumbBackground" Fill="{TemplateBinding Background}" Width="16" Height="16" />
            <Ellipse x:Name="FocusedVisualElement" Stroke="{StaticResource SliderThumbFocusedBorderBrush}" Width="16" Height="16" StrokeThickness="2" Opacity="0" />
            <Ellipse x:Name="DisabledVisualElement" Fill="{StaticResource DisabledVisualElement}" Width="16" Height="16" Opacity="0" />
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="ThumbBackground" Property="Fill" Value="{StaticResource SliderThumbHoverBackgroundBrush}" />
            </Trigger>
            <Trigger Property="IsMouseCaptured" Value="True">
              <Setter TargetName="ThumbBackground" Property="Fill" Value="{StaticResource SliderThumbPressedBackgroundBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="DisabledVisualElement" Property="Opacity" Value="1" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Slider Vertical Thumb Style  ********************************* -->
  <Style x:Key="VSliderThumbStyle" TargetType="{x:Type Thumb}">
    <Setter Property="Background" Value="{StaticResource SliderThumbBackgroundBrush}" />
    <Setter Property="MinHeight" Value="8" />
    <Setter Property="MinWidth" Value="12" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Grid>
            <Ellipse x:Name="ThumbBackground" Fill="{TemplateBinding Background}" Width="16" Height="16" />
            <Ellipse x:Name="FocusedVisualElement" Stroke="{StaticResource SliderThumbFocusedBorderBrush}" Width="16" Height="16" StrokeThickness="2" Opacity="0" />
            <Ellipse x:Name="DisabledVisualElement" Fill="{StaticResource DisabledVisualElement}" Width="16" Height="16" Opacity="0" />
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="ThumbBackground" Property="Fill" Value="{StaticResource SliderThumbHoverBackgroundBrush}" />
            </Trigger>
            <Trigger Property="IsMouseCaptured" Value="True">
              <Setter TargetName="ThumbBackground" Property="Fill" Value="{StaticResource SliderThumbPressedBackgroundBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="DisabledVisualElement" Property="Opacity" Value="1" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Slider Style  ********************************* -->
  <Style x:Key="SliderStyle" TargetType="{x:Type Slider}">
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Slider}">
          <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Disabled" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
                <RowDefinition Height="Auto" />
              </Grid.RowDefinitions>
              <TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="6" Placement="Top" Grid.Row="0" Visibility="Collapsed" />
              <TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="6" Placement="Bottom" Grid.Row="2" Visibility="Collapsed" />
              <Border x:Name="TrackBackground" Background="{StaticResource SliderTrackBackgroundBrush}" Height="6" Grid.Row="1" VerticalAlignment="center">
                <Canvas Margin="-6,-1">
                  <Rectangle x:Name="PART_SelectionRange" Fill="{StaticResource SliderSelectionRangeBackgroundBrush}" Height="6" Width="0" Visibility="Hidden" />
                </Canvas>
              </Border>
              <Track x:Name="PART_Track" Grid.Row="1">
                <Track.DecreaseRepeatButton>
                  <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}" />
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                  <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}" />
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                  <Thumb x:Name="Thumb" Style="{StaticResource HSliderThumbStyle}" />
                </Track.Thumb>
              </Track>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="TickPlacement" Value="TopLeft">
              <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
              <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HSliderThumbStyle}" />
              <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
              <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
              <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HSliderThumbStyle}" />
              <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
              <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
              <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
            </Trigger>
            <Trigger Property="IsSelectionRangeEnabled" Value="true">
              <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible" />
            </Trigger>
            <Trigger Property="IsKeyboardFocused" Value="true">
              <Setter Property="Foreground" TargetName="Thumb" Value="{StaticResource SliderThumbFocusedBorderBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Vertical">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type Slider}">
              <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                  </Grid.ColumnDefinitions>
                  <TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left" Visibility="Collapsed" Width="6" />
                  <TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" Visibility="Collapsed" Width="6" />
                  <Border x:Name="TrackBackground" Background="{StaticResource SliderTrackBackgroundBrush}" Grid.Column="1" HorizontalAlignment="center" Width="6">
                    <Canvas Margin="-1,-6">
                      <Rectangle x:Name="PART_SelectionRange" Fill="{StaticResource SliderSelectionRangeBackgroundBrush}" Visibility="Hidden" Width="6" />
                    </Canvas>
                  </Border>
                  <Track x:Name="PART_Track" Grid.Column="1">
                    <Track.DecreaseRepeatButton>
                      <RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}" />
                    </Track.DecreaseRepeatButton>
                    <Track.IncreaseRepeatButton>
                      <RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}" />
                    </Track.IncreaseRepeatButton>
                    <Track.Thumb>
                      <Thumb x:Name="Thumb" Style="{StaticResource VSliderThumbStyle}" />
                    </Track.Thumb>
                  </Track>
                </Grid>
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="TickPlacement" Value="TopLeft">
                  <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
                  <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VSliderThumbStyle}" />
                  <Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5" />
                </Trigger>
                <Trigger Property="TickPlacement" Value="BottomRight">
                  <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
                  <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VSliderThumbStyle}" />
                  <Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5" />
                </Trigger>
                <Trigger Property="TickPlacement" Value="Both">
                  <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
                  <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
                </Trigger>
                <Trigger Property="IsSelectionRangeEnabled" Value="true">
                  <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible" />
                </Trigger>
                <Trigger Property="IsKeyboardFocused" Value="true">
                  <Setter Property="Foreground" TargetName="Thumb" Value="{StaticResource SliderThumbFocusedBorderBrush}" />
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- *********************************  RepeatButton Style  ********************************* -->
  <Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="Padding" Value="10,0,10,2" />
    <Setter Property="MinHeight" Value="30" />
    <Setter Property="MinWidth" Value="30" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentControl">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentControl">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="Bd" Fill="{StaticResource ButtonBackgroundBrush}" Stroke="{StaticResource ButtonBorderBrush}" StrokeThickness="1" />
            <ContentControl x:Name="ContentControl" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
              <ContentPresenter x:Name="contentPresenter" />
            </ContentControl>
            <Rectangle x:Name="FocusedVisualElement" Stroke="{StaticResource ButtonPressedBorderBrush}" Visibility="Collapsed" StrokeThickness="2" />
            <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledVisualElement}" Visibility="Collapsed" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- ********************************** GridSplitter Style **********************************-->
  <Style x:Key="GridSplitterStyle" TargetType="{x:Type GridSplitter}">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource GridSplitterBackgroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource GridSplitterBorderBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="PreviewStyle">
      <Setter.Value>
        <Style TargetType="Control">
          <Setter Property="Control.Template">
            <Setter.Value>
              <ControlTemplate>
                <Rectangle Fill="{StaticResource GridSplitterPressedBackgroundBrush}" Opacity="0.8" />
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid>
            <Border x:Name="border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" MinHeight="8" MinWidth="8">
              <Grid>
                <StackPanel x:Name="HGrip" Height="8" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical">
                  <Rectangle Fill="{StaticResource GlyphBackgroundBrush}" Height="1" Margin="1,2,1,1" StrokeThickness="0" Width="20" />
                  <Rectangle Fill="{StaticResource GlyphBackgroundBrush}" Height="1" Margin="1,1,1,2" StrokeThickness="0" Width="20" />
                </StackPanel>
                <StackPanel x:Name="VGrip" Width="8" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Visibility="Collapsed">
                  <Rectangle Fill="{StaticResource GlyphBackgroundBrush}" Height="20" Margin="2,1,1,1" StrokeThickness="0" Width="1" />
                  <Rectangle Fill="{StaticResource GlyphBackgroundBrush}" Height="20" Margin="1,1,2,1" StrokeThickness="0" Width="1" />
                </StackPanel>
              </Grid>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="HorizontalAlignment" Value="Stretch">
              <Setter TargetName="HGrip" Property="Visibility" Value="Visible" />
              <Setter TargetName="VGrip" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="VerticalAlignment" Value="Stretch">
              <Setter TargetName="VGrip" Property="Visibility" Value="Visible" />
              <Setter TargetName="HGrip" Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="border" Property="Background" Value="{StaticResource GridSplitterHoverBackgroundBrush}" />
              <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource GridSplitterHoverBorderBrush}" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
              <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource GridSplitterFocusedBorderBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- ********************************** ProgressBar Style **********************************-->
  <Style x:Key="ProgressBarStyle" TargetType="{x:Type ProgressBar}">
    <Setter Property="Foreground" Value="{StaticResource ProgressBarForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource ProgressBarBackgroundBrush}" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ProgressBar}">
          <Grid x:Name="TemplateRoot" SnapsToDevicePixels="true">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Determinate" />
                <VisualState x:Name="Indeterminate">
                  <Storyboard RepeatBehavior="Forever">
                    <DoubleAnimation Duration="00:00:.5" From="0" To="20" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X" Storyboard.TargetName="IndeterminateGradientFill" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ProgressBarTrack" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
            <Rectangle x:Name="PART_Track" Margin="{TemplateBinding BorderThickness}" />
            <Decorator x:Name="PART_Indicator" HorizontalAlignment="Left" Margin="{TemplateBinding BorderThickness}">
              <Grid x:Name="Foreground">
                <Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}" />
              </Grid>
            </Decorator>
            <Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
              <Rectangle x:Name="IndeterminateSolidFill" Fill="{TemplateBinding Foreground}" Margin="{TemplateBinding BorderThickness}" Opacity="1" RenderTransformOrigin="0.5,0.5" StrokeThickness="0" />
              <Rectangle x:Name="IndeterminateGradientFill" Fill="{StaticResource ProgressBarIndeterminateBackgroundBrush}" Margin="{TemplateBinding BorderThickness}" StrokeThickness="1" />
            </Grid>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
              <Setter Property="LayoutTransform" TargetName="TemplateRoot">
                <Setter.Value>
                  <RotateTransform Angle="-90" />
                </Setter.Value>
              </Setter>
            </Trigger>
            <Trigger Property="IsIndeterminate" Value="true">
              <Setter Property="Visibility" TargetName="Indicator" Value="Collapsed" />
              <Setter Property="Visibility" TargetName="IndeterminateRoot" Value="Visible" />
            </Trigger>
            <Trigger Property="IsIndeterminate" Value="false">
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- ********************************** PasswordBox Style **********************************-->
  <Style x:Key="PasswordBoxStyle" TargetType="{x:Type PasswordBox}">
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="13.333" />
    <Setter Property="Foreground" Value="{StaticResource PasswordBoxForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource TextBoxBackgroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="6,4" />
    <Setter Property="MinHeight" Value="30" />
    <Setter Property="SelectionBrush" Value="{StaticResource TextBoxFocusedBrush}" />
    <Setter Property="PasswordChar" Value="●" />
    <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
    <Setter Property="AllowDrop" Value="true" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
    <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
    <Setter Property="FlowDirection" Value="LeftToRight" />
    <Setter Property="CaretBrush" Value="{StaticResource CaretForegroundBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type PasswordBox}">
          <Grid>
            <Border Background="{TemplateBinding Background}" x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
            <Border x:Name="DisabledVisualElement" BorderBrush="{StaticResource DisabledVisualElement}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource DisabledVisualElement}" IsHitTestVisible="False" Opacity="0" />
            <Border x:Name="ReadOnlyVisualElement" Background="{StaticResource TextBoxReadOnlyBackgroundBrush}" Opacity="0" />
            <Border>
              <ScrollViewer x:Name="PART_ContentHost" />
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Opacity" Value="1" TargetName="DisabledVisualElement" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="BorderBrush" Value="{StaticResource TextBoxHoverBorderBrush}" TargetName="Bd" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
              <Setter Property="BorderBrush" Value="{StaticResource TextBoxFocusedBrush}" TargetName="Bd" />
            </Trigger>
            <MultiDataTrigger>
              <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding IsReadOnly, RelativeSource={RelativeSource Self}}" Value="True" />
                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True" />
              </MultiDataTrigger.Conditions>
              <Setter Property="Opacity" Value="1" TargetName="ReadOnlyVisualElement" />
            </MultiDataTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  ToolTip Style  ********************************* -->
  <Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
    <Setter Property="OverridesDefaultStyle" Value="true" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource TooltipBackgroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource TooltipBorderBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="10,7" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ToolTip">
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}" StrokeThickness="{TemplateBinding BorderThickness}" />
            <StackPanel Orientation="Horizontal" d:LayoutOverrides="Width, Height">
              <ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" />
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Expander Right Style  ********************************* -->
  <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Border Padding="{TemplateBinding Padding}">
            <Grid Background="{StaticResource TransparentBrush}" SnapsToDevicePixels="False">
              <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
              <Grid>
                <Grid.LayoutTransform>
                  <TransformGroup>
                    <TransformGroup.Children>
                      <TransformCollection>
                        <RotateTransform Angle="-90" />
                      </TransformCollection>
                    </TransformGroup.Children>
                  </TransformGroup>
                </Grid.LayoutTransform>
                <Rectangle x:Name="rectangle" Width="30" Height="30" Fill="{StaticResource ExpanderButtonBackgroundBrush}" HorizontalAlignment="Center" Stroke="{StaticResource ExpanderButtonBorderBrush}" VerticalAlignment="Center" />
                <Path x:Name="arrow" Width="10" Height="6" Fill="{StaticResource GlyphBackgroundBrush}" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " Stretch="Fill" RenderTransformOrigin="0.5, 0.5" />
              </Grid>
              <ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" Grid.Row="1" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Stretch" />
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="true">
              <Setter Property="Data" TargetName="arrow" Value="M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowHoverBorderBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowPressedBorderBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Expander Up Style  ********************************* -->
  <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Border Padding="{TemplateBinding Padding}">
            <Grid Background="{StaticResource TransparentBrush}" SnapsToDevicePixels="False">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="30" />
                <ColumnDefinition Width="*" />
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.LayoutTransform>
                  <TransformGroup>
                    <TransformGroup.Children>
                      <TransformCollection>
                        <RotateTransform Angle="180" />
                      </TransformCollection>
                    </TransformGroup.Children>
                  </TransformGroup>
                </Grid.LayoutTransform>
                <Rectangle x:Name="rectangle" Width="30" Height="30" Fill="{StaticResource ExpanderButtonBackgroundBrush}" HorizontalAlignment="Center" Stroke="{StaticResource ExpanderButtonBorderBrush}" VerticalAlignment="Center" />
                <Path x:Name="arrow" Width="10" Height="6" Fill="{StaticResource GlyphBackgroundBrush}" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " Stretch="Fill" RenderTransformOrigin="0.5, 0.5" />
              </Grid>
              <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center" />
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="true">
              <Setter Property="Data" TargetName="arrow" Value="M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowHoverBorderBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowPressedBorderBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Expander Left Style  ********************************* -->
  <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Border Padding="{TemplateBinding Padding}">
            <Grid Background="{StaticResource TransparentBrush}" SnapsToDevicePixels="False">
              <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
              <Grid>
                <Grid.LayoutTransform>
                  <TransformGroup>
                    <TransformGroup.Children>
                      <TransformCollection>
                        <RotateTransform Angle="90" />
                      </TransformCollection>
                    </TransformGroup.Children>
                  </TransformGroup>
                </Grid.LayoutTransform>
                <Rectangle x:Name="rectangle" Width="30" Height="30" Fill="{StaticResource ExpanderButtonBackgroundBrush}" HorizontalAlignment="Center" Stroke="{StaticResource ExpanderButtonBorderBrush}" VerticalAlignment="Center" />
                <Path x:Name="arrow" Width="10" Height="6" Fill="{StaticResource GlyphBackgroundBrush}" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " Stretch="Fill" RenderTransformOrigin="0.5, 0.5" />
              </Grid>
              <ContentPresenter Grid.Row="1" HorizontalAlignment="Center" Margin="0,4,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Stretch" />
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="true">
              <Setter Property="Data" TargetName="arrow" Value="M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowHoverBorderBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowPressedBorderBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Expander Down Style  ********************************* -->
  <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Border Padding="{TemplateBinding Padding}">
            <Grid Background="{StaticResource TransparentBrush}" SnapsToDevicePixels="False">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="30" />
                <ColumnDefinition Width="*" />
              </Grid.ColumnDefinitions>
              <Rectangle x:Name="rectangle" Width="30" Height="30" Fill="{StaticResource ExpanderButtonBackgroundBrush}" HorizontalAlignment="Center" Stroke="{StaticResource ExpanderButtonBorderBrush}" VerticalAlignment="Center" />
              <Path x:Name="arrow" Width="10" Height="6" Fill="{StaticResource GlyphBackgroundBrush}" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " Stretch="Fill" RenderTransformOrigin="0.5, 0.5" />
              <ContentPresenter Grid.Column="1" HorizontalAlignment="Stretch" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center" />
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="true">
              <Setter Property="Data" TargetName="arrow" Value="M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonHoverBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowHoverBorderBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle" Value="{StaticResource ExpanderButtonPressedBorderBrush}" />
              <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ExpanderArrowPressedBorderBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  Expander Style  ********************************* -->
  <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="Background" Value="{StaticResource ExpanderBackgroundBrush}" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="2" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Expander}">
          <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3" SnapsToDevicePixels="true">
            <DockPanel>
              <ToggleButton x:Name="HeaderSite" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" Content="{TemplateBinding Header}" DockPanel.Dock="Top" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" MinWidth="0" MinHeight="0" Padding="{TemplateBinding Padding}" Style="{StaticResource ExpanderDownHeaderStyle}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
              <ContentPresenter x:Name="ExpandSite" DockPanel.Dock="Bottom" Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            </DockPanel>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="true">
              <Setter Property="Visibility" TargetName="ExpandSite" Value="Visible" />
            </Trigger>
            <Trigger Property="ExpandDirection" Value="Right">
              <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right" />
              <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left" />
              <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}" />
            </Trigger>
            <Trigger Property="ExpandDirection" Value="Up">
              <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top" />
              <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom" />
              <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}" />
            </Trigger>
            <Trigger Property="ExpandDirection" Value="Left">
              <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left" />
              <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right" />
              <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource ExpanderDisabledForegroundBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  ToggleButton Style  ********************************* -->
  <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="Padding" Value="10,0,10,2" />
    <Setter Property="MinHeight" Value="30" />
    <Setter Property="MinWidth" Value="30" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentControl">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentControl">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="checked">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentControl">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentControl1">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentControl1">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
                <VisualState x:Name="Indeterminate" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="Bd" Fill="{StaticResource ButtonBackgroundBrush}" Stroke="{StaticResource ButtonBorderBrush}" StrokeThickness="1" />
            <Rectangle x:Name="checked" Fill="{StaticResource ButtonPressedBackgroundBrush}" Stroke="{StaticResource ButtonPressedBorderBrush}" StrokeThickness="1" Visibility="Collapsed" />
            <ContentControl x:Name="contentControl" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}">
              <ContentPresenter x:Name="contentPresenter" />
            </ContentControl>
            <ContentControl x:Name="contentControl1" Visibility="Collapsed" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Foreground="{StaticResource ForegroundBrush}">
              <ContentPresenter x:Name="contentPresenter1" />
            </ContentControl>
            <Rectangle x:Name="FocusedVisualElement" Stroke="{StaticResource ButtonPressedBorderBrush}" Visibility="Collapsed" StrokeThickness="2" />
            <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledVisualElement}" Visibility="Collapsed" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  GroupBox Style  ********************************* -->
  <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
  <Style x:Key="GroupBoxStyle" TargetType="{x:Type GroupBox}">
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource GroupBoxBorderBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="5" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type GroupBox}">
          <Grid SnapsToDevicePixels="true">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="6" />
              <ColumnDefinition Width="Auto" />
              <ColumnDefinition Width="*" />
              <ColumnDefinition Width="6" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
              <RowDefinition Height="6" />
            </Grid.RowDefinitions>
            <Border BorderBrush="{StaticResource TransparentBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="4" Grid.Column="0" Grid.Row="1" Grid.RowSpan="3" />
            <Border x:Name="Header" Grid.Column="1" Padding="10,0,10,0" Grid.Row="0" Grid.RowSpan="2">
              <ContentPresenter ContentSource="Header" Height="20" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            </Border>
            <ContentPresenter Grid.ColumnSpan="2" Grid.Column="1" Margin="{TemplateBinding Padding}" Grid.Row="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            <Border Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3">
              <Border.OpacityMask>
                <MultiBinding ConverterParameter="7" Converter="{StaticResource BorderGapMaskConverter}">
                  <Binding ElementName="Header" Path="ActualWidth" />
                  <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
                  <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
                </MultiBinding>
              </Border.OpacityMask>
              <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              </Border>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!--********************** Implicit Styles *********************** -->
  <Style BasedOn="{StaticResource ButtonStyle}" TargetType="{x:Type Button}" />
  <Style BasedOn="{StaticResource ScrollBarStyle}" TargetType="{x:Type ScrollBar}" />
  <Style BasedOn="{StaticResource ScrollViewerStyle}" TargetType="{x:Type ScrollViewer}" />
  <Style BasedOn="{StaticResource ComboBoxStyle}" TargetType="{x:Type ComboBox}" />
  <Style BasedOn="{StaticResource ComboBoxItemStyle}" TargetType="{x:Type ComboBoxItem}" />
  <Style BasedOn="{StaticResource TextBoxStyle}" TargetType="{x:Type TextBox}" />
  <Style BasedOn="{StaticResource ListBoxStyle}" TargetType="{x:Type ListBox}" />
  <Style BasedOn="{StaticResource ListBoxItemStyle}" TargetType="{x:Type ListBoxItem}" />
  <Style BasedOn="{StaticResource CheckBoxStyle}" TargetType="CheckBox">
    <!-- Adding setter for VerticalContentAlignment to target default behavior of MS check box. -->
    <Setter Property="VerticalContentAlignment" Value="Top" />
  </Style>
  <Style BasedOn="{StaticResource RadioButtonStyle}" TargetType="{x:Type RadioButton}" />
  <Style BasedOn="{StaticResource LabelStyle}" TargetType="{x:Type Label}" />
  <Style BasedOn="{StaticResource SliderStyle}" TargetType="{x:Type Slider}" />
  <Style BasedOn="{StaticResource RepeatButtonStyle}" TargetType="{x:Type RepeatButton}" />
  <Style BasedOn="{StaticResource GridSplitterStyle}" TargetType="{x:Type GridSplitter}" />
  <Style BasedOn="{StaticResource ProgressBarStyle}" TargetType="{x:Type ProgressBar}" />
  <Style BasedOn="{StaticResource PasswordBoxStyle}" TargetType="{x:Type PasswordBox}" />
  <Style BasedOn="{StaticResource ExpanderStyle}" TargetType="{x:Type Expander}" />
  <Style BasedOn="{StaticResource ToggleButtonStyle}" TargetType="{x:Type ToggleButton}" />
  <Style BasedOn="{StaticResource GroupBoxStyle}" TargetType="{x:Type GroupBox}" />

</ResourceDictionary>