<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:core="clr-namespace:System;assembly=mscorlib"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <!--#region Colors and Brushes -->

    <SolidColorBrush x:Key="CategoryForegroundNormal" Color="#808080"/>
    <SolidColorBrush x:Key="CategoryForegroundSelected" Color="White"/>
    <SolidColorBrush x:Key="CategoryHighlight" Color="#114C7B"/>
    <SolidColorBrush x:Key="CategoryListBackground" Color="#1B1C1E"/>
    <SolidColorBrush x:Key="CategoryMouseOverBackground" Color="#252628"/>

    <SolidColorBrush x:Key="ButtonBackcolor" Color="#2B2B2B"/>
    <SolidColorBrush x:Key="ButtonForecolor" Color="#B5BCC9"/>
    <SolidColorBrush x:Key="ButtonMouseOverBackcolor" Color="#323232"/>
    <SolidColorBrush x:Key="ButtonMousePressedBackcolor" Color="#1B1C1E"/>
    <SolidColorBrush x:Key="ButtonDisabledBackcolor" Color="#2B2B2B"/>
    <SolidColorBrush x:Key="ButtonBorder" Color="#323232"/>
    <SolidColorBrush x:Key="ButtonFocusedBorder" Color="#114C7B"/>
    <SolidColorBrush x:Key="ButtonOverBackcolor" Color="#383838"/>

    <SolidColorBrush x:Key="ToolButtonForecolor" Color="#B5BCC9"/>
    <SolidColorBrush x:Key="ToolButtonMouseOverBackcolor" Color="#373D48"/>
    <SolidColorBrush x:Key="ToolButtonMousePressedBackcolor" Color="#333842"/>
    <SolidColorBrush x:Key="ToolButtonMouseDisabledForecolor" Color="#646464"/>
    <SolidColorBrush x:Key="ToolbarBordercolor" Color="#000000"/>

    <SolidColorBrush x:Key="SearchBorder" Color="#000000"/>
    <SolidColorBrush x:Key="SearchBackcolor" Color="#232428"/>

    <SolidColorBrush x:Key="ControlBackcolor" Color="#1B1C1E"/>
    <SolidColorBrush x:Key="ControlBordercolor" Color="#000000"/>
    <SolidColorBrush x:Key="ControlForecolor" Color="#A0A0A0"/>

    <SolidColorBrush x:Key="TextBackcolor" Color="#2B2B2B"/>
    <SolidColorBrush x:Key="TextForecolor" Color="#ABB2BF"/>
    <SolidColorBrush x:Key="DisabledTextBackcolor" Color="#252628"/>
    <SolidColorBrush x:Key="TextMouseOverBorder" Color="#114C7B"/>
    <SolidColorBrush x:Key="TextBorder" Color="#3C3C3C"/>
    <SolidColorBrush x:Key="TextFocusedBorder" Color="#114C7B"/>

    <SolidColorBrush x:Key="ListViewBackcolor" Color="#232428"/>
    <SolidColorBrush x:Key="ListViewForecolor" Color="#B5BCC9"/>
    <SolidColorBrush x:Key="ListViewMouseOverBackcolor" Color="#31363F"/>
    <SolidColorBrush x:Key="ListViewMouseOverForecolor" Color="#F0F0F0"/>
    <SolidColorBrush x:Key="ListViewSelectedForecolor" Color="White"/>
    <SolidColorBrush x:Key="ListViewSelectedBackcolor" Color="#114C7B"/>
    <SolidColorBrush x:Key="ListViewIconForecolor" Color="#777D88"/>
    <SolidColorBrush x:Key="ListViewHeaderForecolor" Color="#777D88"/>

    <SolidColorBrush x:Key="StatusbarBackcolor" Color="#232428"/>
    <SolidColorBrush x:Key="StatusbarIconcolor" Color="#777D88"/>

    <Thickness x:Key="CategoryListBorderThickness">0,0,1,0</Thickness>
    <Thickness x:Key="MainContentBorderThickness">0,1,0,0</Thickness>

    <SolidColorBrush x:Key="PlaceHolderForecolor" Color="#969696"/>

    <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey }" Color="#A0A0A0"/>
    <SolidColorBrush x:Key="{x:Static SystemColors.WindowTextBrushKey }" Color="#A0A0A0"/>
    <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey }" Color="#1B1C1E"/>
    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey }" Color="#0A6AB6"/>
    <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextColorKey }" Color="#A0A0A0"/>

    <!--<SolidColorBrush x:Key="{x:Static SystemColors.DesktopBrushKey }" Color="#1B1C1E"/>-->

    <SolidColorBrush x:Key="NewDownloadTextBoxBackground" Color="#21252B"/>
    <SolidColorBrush x:Key="HyperlinkForecolor" Color="#25608F"/>

    <SolidColorBrush x:Key="ScrollBarThumbColorNormal" Color="#343537"/>
    <SolidColorBrush x:Key="ScrollBarThumbColorHot" Color="#3E3F41"/>

    <SolidColorBrush x:Key="ControlDisabledBackcolor" Color="#111214"/>
    <SolidColorBrush x:Key="TabSelectionColor" Color="#114C7B"/>

    <SolidColorBrush x:Key="ProgressBarBackcolor" Color="#343537"/>
    <SolidColorBrush x:Key="ProgressBarForecolor" Color="#114C7B"/>

    <core:Double x:Key="ButtonDisabledOpacity">0.4</core:Double>

    <Style TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground"
            Value="{StaticResource ControlForecolor}"/>
    </Style>

    <!--#region CheckBox-->
    <Style x:Key="{x:Type CheckBox}"
       TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels"
          Value="true" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="FocusVisualStyle"
          Value="{DynamicResource CheckBoxFocusVisual}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <BulletDecorator Background="Transparent" VerticalAlignment="Center">
                        <BulletDecorator.Bullet>
                            <Border x:Name="Border" Width="16" Height="16"  CornerRadius="3"
                                    BorderThickness="0" BorderBrush="{StaticResource CategoryHighlight}" 
                                    Background="{StaticResource CategoryHighlight}" Opacity="1.0">
                                <!--<Border.BorderBrush>
                                    <LinearGradientBrush StartPoint="0,0"
                                     EndPoint="0,1">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="{DynamicResource BorderLightColor}"
                                    Offset="0.0" />
                                                <GradientStop Color="{DynamicResource BorderDarkColor}"
                                    Offset="1.0" />
                                            </GradientStopCollection>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Border.BorderBrush>
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0"
                                     EndPoint="0,1">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="{DynamicResource ControlLightColor}" />
                                                <GradientStop Color="{DynamicResource ControlMediumColor}"
                                    Offset="1.0" />
                                            </GradientStopCollection>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>

                                </Border.Background>-->
                                <Grid>
                                    <Path Visibility="Collapsed"
                                        Width="16"
                                        Height="16"
                                        x:Name="CheckMark"
                                        SnapsToDevicePixels="True"
                                        StrokeThickness="2"
                                        Data="M 3,8 7,12 13,4">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="White" />
                                        </Path.Stroke>
                                    </Path>
                                    <!--<Path Visibility="Collapsed"
                      Width="7"
                      Height="7"
                      x:Name="InderminateMark"
                      SnapsToDevicePixels="False"
                      StrokeThickness="2"
                      Data="M 0 7 L 7 0">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="White" />
                                        </Path.Stroke>
                                    </Path>-->
                                </Grid>
                            </Border>
                        </BulletDecorator.Bullet>
                        <!-- <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Panel.Background).
                      (GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource ControlMouseOverColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Panel.Background).
                      (GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource ControlPressedColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Border.BorderBrush).
                      (GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource PressedBorderDarkColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Border.BorderBrush).
                      (GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource PressedBorderLightColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)"
                                                 Storyboard.TargetName="CheckMark">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                            Value="{x:Static Visibility.Visible}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)"
                                                 Storyboard.TargetName="InderminateMark">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                            Value="{x:Static Visibility.Visible}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>-->
                        <ContentPresenter SnapsToDevicePixels="True" Margin="10,0,0,0"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            RecognizesAccessKey="True" />
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="Opacity" Value="0.7"/>
                        </Trigger>
                        <!--<Trigger Property="IsIndeterminate" Value="True">
                            <Setter TargetName="InderminateMark" Property="Visibility" Value="Visible"/>
                        </Trigger>-->
                        <Trigger Property="IsChecked" Value="False">
                            <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Opacity" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region ComboBox-->
    <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="20" />
            </Grid.ColumnDefinitions>
            <Border x:Name="Border"  
                    Grid.ColumnSpan="2" 
                    Background="{TemplateBinding Background}" 
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1" />
            <Border x:Name="Content"
                Grid.Column="0" Margin="1" 
                Background="{TemplateBinding Background}" 
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="0" />
            <Path  x:Name="Arrow" Grid.Column="1"  
                   Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center"
                   VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z"/>
        </Grid>
        <ControlTemplate.Triggers>
            <!--<Trigger Property="ToggleButton.IsMouseOver" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{StaticResource ToolButtonMouseOverBackcolor}" />
                <Setter TargetName="Content" Property="Background" Value="{StaticResource ToolButtonMouseOverBackcolor}" />
            </Trigger>-->
            <Trigger Property="ToggleButton.IsChecked" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{StaticResource ButtonMousePressedBackcolor}" />
                <Setter TargetName="Content" Property="Background" Value="{StaticResource ButtonMousePressedBackcolor}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <!--<Setter TargetName="Border" Property="Background" Value="{StaticResource ControlBackcolor}" />-->
                <!--<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ControlBackcolor}" />-->
                <Setter Property="Foreground" Value="{StaticResource ControlForecolor}"/>
                <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource ControlForecolor}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
        <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
    </ControlTemplate>

    <Style x:Key="{x:Type ComboBox}" TargetType="ComboBox">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
        <Setter Property="BorderBrush" Value="{StaticResource TextBorder}"/>
        <Setter Property="Foreground" Value="{StaticResource TextForecolor}" />
        <Setter Property="Background" Value="{StaticResource TextBackcolor}" />
        <Setter Property="MinWidth" Value="20"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBox">
                    <Grid>
                        <ToggleButton  Name="ToggleButton"  Template="{StaticResource ComboBoxToggleButton}"  Grid.Column="2" 
                                       Focusable="false" 
                                       Foreground="{TemplateBinding Foreground}"
                                       Background="{TemplateBinding Background}"
                                       BorderBrush="{TemplateBinding BorderBrush}"
                                       IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                                       ClickMode="Press">
                        </ToggleButton>
                        <ContentPresenter
                            Name="ContentSite"
                            IsHitTestVisible="False" 
                            Content="{TemplateBinding SelectionBoxItem}"
                            ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                            ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                            Margin="3,3,23,3"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left" />
                        <TextBox x:Name="PART_EditableTextBox"
                            Style="{x:Null}" 
                            Template="{StaticResource ComboBoxTextBox}" 
                            HorizontalAlignment="Left" 
                            VerticalAlignment="Center" 
                            Margin="3,3,23,3"
                            Focusable="True" 
                            Background="Transparent"
                            Visibility="Hidden"
                            IsReadOnly="{TemplateBinding IsReadOnly}"/>
                        <Popup 
                            Name="Popup"
                            Placement="Bottom"
                            IsOpen="{TemplateBinding IsDropDownOpen}"
                            AllowsTransparency="True" 
                            Focusable="False"
                            PopupAnimation="Slide">
                            <Grid 
                                Name="DropDown"
                                SnapsToDevicePixels="True"                
                                MinWidth="{TemplateBinding ActualWidth}"
                                MaxHeight="{TemplateBinding MaxDropDownHeight}">
                                <Border 
                                    CornerRadius="5"
                                        x:Name="DropDownBorder"
                                        Background="{TemplateBinding Background}"
                                        BorderThickness="1"
                                        BorderBrush="{StaticResource ControlBordercolor}"/>
                                <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
                                </ScrollViewer>
                            </Grid>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{StaticResource ControlForecolor}"/>
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                        </Trigger>
                        <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
                            <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="4"/>
                            <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
                        </Trigger>
                        <Trigger Property="IsEditable" Value="true">
                            <Setter Property="IsTabStop" Value="false"/>
                            <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="BorderBrush" Value="{StaticResource TextMouseOverBorder}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="BorderBrush" Value="{StaticResource TextFocusedBorder}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type ComboBoxItem}"
           TargetType="{x:Type ComboBoxItem}">
        <Setter Property="HorizontalContentAlignment"
                Value="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment"
                Value="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding"
                Value="5,5"/>
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Border 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="IsHighlighted"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource CategoryHighlight}"/>
                            <Setter Property="Foreground"
                                    Value="{StaticResource CategoryForegroundSelected}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{StaticResource CategoryForegroundNormal}"/>
                        </Trigger>
                        <Trigger Property="IsSelected"
                                 Value="true">
                            <Setter TargetName="Bd"
                                    Property="Background"
                                    Value="{StaticResource CategoryHighlight}"/>
                            <Setter Property="Foreground"
                                    Value="{StaticResource ControlForecolor}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region ContextMenu-->
    <Style TargetType="{x:Type ContextMenu}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="True" />
        <Setter Property="Grid.IsSharedSizeScope"
          Value="true" />
        <Setter Property="HasDropShadow"
          Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContextMenu}">
                    <Border x:Name="Border" Background="{StaticResource ControlBackcolor}" BorderThickness="1" 
                            BorderBrush="{StaticResource ControlBordercolor}">
                        <StackPanel IsItemsHost="True"
                      KeyboardNavigation.DirectionalNavigation="Cycle" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow" Value="true">
                            <Setter TargetName="Border" Property="Padding" Value="0,3,0,3" />
                            <Setter TargetName="Border" Property="CornerRadius" Value="4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region PasswordBox-->
    <Style x:Key="{x:Type PasswordBox}"
       TargetType="{x:Type PasswordBox}">
        <Setter Property="SnapsToDevicePixels"
          Value="true" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="KeyboardNavigation.TabNavigation"
          Value="None" />
        <Setter Property="FocusVisualStyle"
          Value="{x:Null}" />
        <Setter Property="FontFamily"
          Value="Verdana" />
        <Setter Property="PasswordChar"
          Value="*" />
        <Setter Property="MinWidth"
          Value="20" />
        <Setter Property="Padding"
          Value="2" />
        <Setter Property="MinHeight"
          Value="20" />
        <Setter Property="AllowDrop"
          Value="true" />
        <Setter Property="BorderThickness"
          Value="1" />
        <Setter Property="Padding"
          Value="2" />
        <Setter Property="BorderBrush"
          Value="{StaticResource TextBorder}" />
        <Setter Property="Foreground"
          Value="{StaticResource TextForecolor}" />
        <Setter Property="Background"
          Value="{StaticResource TextBackcolor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border x:Name="Border" Padding="{TemplateBinding Padding}" 
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}">
                        <ScrollViewer x:Name="PART_ContentHost" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource TextBorder}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TextMouseOverBorder}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TextFocusedBorder}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region ScrollBar-->
    <Style x:Key="ScrollBarLineButton"
       TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="Focusable"
          Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border x:Name="Border" Margin="0" BorderThickness="0" 
                            Background="{StaticResource ControlBackcolor}" 
                            BorderBrush="{StaticResource ControlBackcolor}">
                        <Path x:Name="Arrow" HorizontalAlignment="Center" VerticalAlignment="Center"
                            Data="{Binding Content, 
                                RelativeSource={RelativeSource TemplatedParent}}" Fill="{StaticResource ControlForecolor}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"  Value="True"/>
                                <Condition Property="IsEnabled"  Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ButtonOverBackcolor}"/>
                            <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource ControlForecolor}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarPageButton"
       TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="IsTabStop"
          Value="false" />
        <Setter Property="Focusable"
          Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="{StaticResource ControlBackcolor}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarThumb"
       TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Setter Property="IsTabStop"
          Value="false" />
        <Setter Property="Focusable"
          Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Name="ThumBorder" Background="{StaticResource ScrollBarThumbColorNormal}" 
                            BorderBrush="{StaticResource ScrollBarThumbColorNormal}" BorderThickness="0" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"  Value="True">
                            <Setter TargetName="ThumBorder" Property="Background" Value="{StaticResource ScrollBarThumbColorHot}"/>
                            <Setter TargetName="ThumBorder" Property="BorderBrush" Value="{StaticResource ScrollBarThumbColorHot}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="VerticalScrollBar"
                 TargetType="{x:Type ScrollBar}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition MaxHeight="18" />
                <RowDefinition Height="0.00001*" />
                <RowDefinition MaxHeight="18" />
            </Grid.RowDefinitions>
            <Border Grid.RowSpan="3"
            Background="{StaticResource ControlBackcolor}" />
            <RepeatButton Grid.Row="0"
                  Style="{StaticResource ScrollBarLineButton}"
                  Height="18"
                  Command="ScrollBar.LineUpCommand"
                  Content="M 0 4 L 8 4 L 4 0 Z" />
            <Track x:Name="PART_Track" Grid.Row="1" IsDirectionReversed="true">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageUpCommand" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource ScrollBarThumb}" Margin="0" 
                           Background="{StaticResource ScrollBarThumbColorNormal}" 
                           BorderBrush="{StaticResource ScrollBarThumbColorNormal}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageDownCommand" />
                </Track.IncreaseRepeatButton>
            </Track>
            <RepeatButton Grid.Row="2"
                  Style="{StaticResource ScrollBarLineButton}"
                  Height="18"
                  Command="ScrollBar.LineDownCommand"
                  Content="M 0 0 L 4 4 L 8 0 Z" />
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="HorizontalScrollBar"
                 TargetType="{x:Type ScrollBar}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition MaxWidth="18" />
                <ColumnDefinition Width="0.00001*" />
                <ColumnDefinition MaxWidth="18" />
            </Grid.ColumnDefinitions>
            <Border Grid.ColumnSpan="3" Background="{StaticResource ControlBackcolor}" />
            <RepeatButton Grid.Column="0"
                  Style="{StaticResource ScrollBarLineButton}"
                  Width="18"
                  Command="ScrollBar.LineLeftCommand"
                  Content="M 4 0 L 4 8 L 0 4 Z" />
            <Track x:Name="PART_Track"
           Grid.Column="1"
           IsDirectionReversed="False">
                <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageLeftCommand" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource ScrollBarThumb}"
                        Margin="0" Background="{StaticResource ScrollBarThumbColorNormal}" 
                           BorderBrush="{StaticResource ScrollBarThumbColorNormal}">
                    </Thumb>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                      Command="ScrollBar.PageRightCommand" />
                </Track.IncreaseRepeatButton>
            </Track>
            <RepeatButton Grid.Column="2"
                  Style="{StaticResource ScrollBarLineButton}"
                  Width="18"
                  Command="ScrollBar.LineRightCommand"
                  Content="M 0 0 L 4 4 L 0 8 Z" />
        </Grid>
    </ControlTemplate>

    <Style x:Key="{x:Type ScrollBar}"
       TargetType="{x:Type ScrollBar}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="true" />
        <Style.Triggers>
            <Trigger Property="Orientation"
             Value="Horizontal">
                <Setter Property="Width"
              Value="Auto" />
                <Setter Property="Height"
              Value="18" />
                <Setter Property="Template"
              Value="{StaticResource HorizontalScrollBar}" />
            </Trigger>
            <Trigger Property="Orientation"
             Value="Vertical">
                <Setter Property="Width"
              Value="18" />
                <Setter Property="Height"
              Value="Auto" />
                <Setter Property="Template"
              Value="{StaticResource VerticalScrollBar}" />
            </Trigger>
        </Style.Triggers>
    </Style>
    <!--#endregion-->

    <!--#region TabControl-->
    <Style  TargetType="{x:Type TabControl}">
        <Setter Property="OverridesDefaultStyle"
          Value="True" />
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid KeyboardNavigation.TabNavigation="Local">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <!--<VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Border.BorderBrush).
                    (SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="#FFAAAAAA" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>-->
                        <Border BorderBrush="{StaticResource ControlBordercolor}" BorderThickness="1,1,1,0">
                            <TabPanel x:Name="HeaderPanel" Grid.Row="0" Panel.ZIndex="1" Margin="0,0,0,0"
                                IsItemsHost="True" 
                                KeyboardNavigation.TabIndex="1"
                                Background="{StaticResource ControlBackcolor}" />
                        </Border>
                        <Border x:Name="Border" 
                                  Grid.Row="1"
                                  BorderThickness="1"
                                  KeyboardNavigation.TabNavigation="Local"
                                  KeyboardNavigation.DirectionalNavigation="Contained"
                                  KeyboardNavigation.TabIndex="2" 
                                Background="{StaticResource ListViewBackcolor}" 
                                BorderBrush="{StaticResource ControlBordercolor}">
                            <!--<Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1"
                                   StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource ContentAreaColorLight}"
                              Offset="0" />
                                    <GradientStop Color="{DynamicResource ContentAreaColorDark}"
                              Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.BorderBrush>
                                <SolidColorBrush Color="{DynamicResource BorderMediumColor}"/>
                            </Border.BorderBrush>-->
                            <ContentPresenter  x:Name="PART_SelectedContentHost"
                              Margin="4"
                              ContentSource="SelectedContent" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ControlDisabledBackcolor}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TabItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid x:Name="Root">
                        <!--<VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Panel.Background).
                    (GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource ControlPressedColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderThickness)"
                                                    Storyboard.TargetName="Border">
                                            <EasingThicknessKeyFrame KeyTime="0"
                                             Value="1,1,1,0" />
                                        </ThicknessAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Panel.Background).
                    (GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource DisabledControlDarkColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Border.BorderBrush).
                    (SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource DisabledBorderLightColor}"/>
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>-->
                        <Border x:Name="Border" Margin="10,0" Padding="0,5"
                            BorderThickness="0,0,0,2" BorderBrush="{StaticResource ControlBackcolor}" 
                                Background="{StaticResource ControlBackcolor}">
                            <!--<Border.BorderBrush>
                                <SolidColorBrush Color="Cyan" />
                            </Border.BorderBrush>
                            <Border.Background>

                                <LinearGradientBrush StartPoint="0,0"
                                   EndPoint="0,1">
                                    <LinearGradientBrush.GradientStops>
                                        <GradientStopCollection>
                                            <GradientStop Color="{DynamicResource ControlLightColor}"
                                  Offset="0.0" />
                                            <GradientStop Color="{DynamicResource ControlMediumColor}"
                                  Offset="1.0" />
                                        </GradientStopCollection>
                                    </LinearGradientBrush.GradientStops>
                                </LinearGradientBrush>

                            </Border.Background>-->
                            <ContentPresenter x:Name="ContentSite"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center"
                              ContentSource="Header"
                              Margin="15,3"
                              RecognizesAccessKey="True" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Panel.ZIndex" Value="100" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TabSelectionColor}" />
                            <!--<Setter TargetName="Border" Property="Background" Value="{StaticResource ListViewBackcolor}" />-->
                        </Trigger>
                        <Trigger Property="IsSelected" Value="False">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ControlBackcolor}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TabSelectionColor}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ControlBackcolor}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->

    <!--#region TextBox-->
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="SnapsToDevicePixels"
          Value="True" />
        <Setter Property="OverridesDefaultStyle"
          Value="True" />
        <Setter Property="KeyboardNavigation.TabNavigation"
          Value="None" />
        <Setter Property="FocusVisualStyle"
          Value="{x:Null}" />
        <Setter Property="MinWidth"
          Value="20" />
        <Setter Property="MinHeight"
          Value="20" />
        <Setter Property="AllowDrop"
          Value="true" />
        <Setter Property="BorderThickness"
          Value="1" />
        <Setter Property="Padding"
          Value="2" />
        <Setter Property="BorderBrush"
          Value="{StaticResource TextBorder}" />
        <Setter Property="Foreground"
          Value="{StaticResource TextForecolor}" />
        <Setter Property="Background"
          Value="{StaticResource TextBackcolor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border Name="Border" Padding="{TemplateBinding Padding}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}">
                        <!--<Border.Background>
                            <SolidColorBrush Color="{StaticResource TextBackcolor}" />
                        </Border.Background>
                        <Border.BorderBrush>
                            <SolidColorBrush Color="{StaticResource ControlBordercolor}" />
                        </Border.BorderBrush>-->
                        <!--<VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Panel.Background).
                    (SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource DisabledControlLightColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                Storyboard.TargetProperty="(Panel.Background).
                    (SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="0"
                                         Value="{StaticResource DisabledControlDarkColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>-->
                        <ScrollViewer Margin="0"
                        x:Name="PART_ContentHost" Background="{TemplateBinding Background}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource TextBorder}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TextMouseOverBorder}"/>
                        </Trigger>
                        <Trigger Property="IsReadOnly" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TextBorder}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource TextFocusedBorder}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->
    
    <!--#region Button-->
    <Style TargetType="Button" >
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="FocusVisualStyle"  Value="{x:Null}"/>
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="MinWidth" Value="5"/>
        <Setter Property="Background" Value="{StaticResource ButtonBackcolor}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}"/>
        <Setter Property="Padding" Value="10,3"/>
        <Setter Property="Margin" Value="3,3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border 
                              x:Name="Border"  
                              BorderThickness="{TemplateBinding BorderThickness}"
                              Padding="{TemplateBinding Padding}"
                              Background="{TemplateBinding Background}"
                              BorderBrush="{TemplateBinding BorderBrush}">
                        <ContentPresenter SnapsToDevicePixels="True"  Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ButtonFocusedBorder}" />
                        </Trigger>
                        <Trigger Property="IsDefaulted" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ButtonBackcolor}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ButtonMouseOverBackcolor}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource ButtonMousePressedBackcolor}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value="{StaticResource ButtonDisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ButtonFocusedBorder}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->
    
    <!--#region ScrollViewer-->
    <Style
       TargetType="{x:Type ScrollViewer}">
        <Setter Property="OverridesDefaultStyle"
          Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border Grid.Column="1" BorderThickness="0" Background="{StaticResource ControlBackcolor}" />
                        <ScrollContentPresenter CanContentScroll="{TemplateBinding CanContentScroll}"  />
                        <ScrollBar x:Name="PART_VerticalScrollBar"
                     Value="{TemplateBinding VerticalOffset}"
                     Maximum="{TemplateBinding ScrollableHeight}"
                     ViewportSize="{TemplateBinding ViewportHeight}"
                     Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1"/>
                        <ScrollBar x:Name="PART_HorizontalScrollBar"
                     Orientation="Horizontal"
                     Grid.Row="1"
                     Grid.Column="0"
                     Value="{TemplateBinding HorizontalOffset}"
                     Maximum="{TemplateBinding ScrollableWidth}"
                     ViewportSize="{TemplateBinding ViewportWidth}"
                     Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--#endregion-->
    
</ResourceDictionary>