<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:root="clr-namespace:ModernWpf"
    xmlns:local="clr-namespace:ModernWpf.Controls"
    xmlns:primitives="clr-namespace:ModernWpf.Controls.Primitives"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ModernWpf;component/Styles/CornerRadius.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <sys:Boolean x:Key="AutoHideScrollBars">False</sys:Boolean>

    <primitives:CornerRadiusFilterConverter x:Key="TopLeftCornerRadiusDoubleValueConverter8x" Filter="TopLeftValue" Scale="8" />
    <primitives:CornerRadiusFilterConverter x:Key="BottomRightCornerRadiusDoubleValueConverter8x" Filter="BottomRightValue" Scale="8" />

    <primitives:CornerRadiusFilterConverter x:Key="TopLeftCornerRadiusDoubleValueConverter2x" Filter="TopLeftValue" Scale="2"/>
    <primitives:CornerRadiusFilterConverter x:Key="BottomRightCornerRadiusDoubleValueConverter2x" Filter="BottomRightValue" Scale="2"/>

    <Thickness x:Key="ScrollBarHorizontalDecreaseMargin">4,0,0,0</Thickness>
    <Thickness x:Key="ScrollBarHorizontalIncreaseMargin">0,0,4,0</Thickness>
    <Thickness x:Key="ScrollBarVerticalDecreaseMargin">0,4,0,0</Thickness>
    <Thickness x:Key="ScrollBarVerticalIncreaseMargin">0,0,0,4</Thickness>

    <Style x:Key="DefaultThumbStyle" TargetType="Thumb">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Background" Value="{DynamicResource ThumbBackground}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="BorderBrush" Value="{DynamicResource ThumbBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            To="1"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="BackgroundPointerOver" />
                                        <DoubleAnimation
                                            Duration="0"
                                            To="0"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="Background" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Duration="0"
                                            To="1"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="BackgroundPressed" />
                                        <DoubleAnimation
                                            Duration="0"
                                            To="0"
                                            Storyboard.TargetProperty="Opacity"
                                            Storyboard.TargetName="Background" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                            x:Name="Background"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}" />
                        <Border
                            x:Name="BackgroundPointerOver"
                            Background="{DynamicResource ThumbBackgroundPointerOver}"
                            BorderBrush="{DynamicResource ThumbBorderBrushPointerOver}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity="0" />
                        <Border
                            x:Name="BackgroundPressed"
                            Background="{DynamicResource ThumbBackgroundPressed}"
                            BorderBrush="{DynamicResource ThumbBorderBrushPressed}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Thumb" BasedOn="{StaticResource DefaultThumbStyle}" />

    <KeyTime x:Key="ScrollBarExpandDuration">00:00:00.167</KeyTime>
    <Duration x:Key="ScrollBarOpacityChangeDuration">00:00:00.083</Duration>
    <KeyTime x:Key="ScrollBarColorChangeDuration">00:00:00.083</KeyTime>
    <KeyTime x:Key="ScrollBarContractDuration">00:00:00.167</KeyTime>
    <sys:Double x:Key="ScrollBarThumbOffset">2</sys:Double>

    <sys:String x:Key="ScrollBarContractDelay">00:00:02</sys:String>
    <sys:String x:Key="ScrollBarContractFinalKeyframe">00:00:02.1</sys:String>
    <sys:Double x:Key="ScrollBarSize">12</sys:Double>
    <Thickness x:Key="ScrollBarMargin">1</Thickness>

    <sys:Double x:Key="ScrollBarVerticalThumbMinHeight">30</sys:Double>
    <sys:Double x:Key="ScrollBarVerticalThumbMinWidth">8</sys:Double>

    <sys:Double x:Key="ScrollBarHorizontalThumbMinWidth">30</sys:Double>
    <sys:Double x:Key="ScrollBarHorizontalThumbMinHeight">8</sys:Double>

    <sys:Double x:Key="ScrollBarThumbStrokeThickness">6</sys:Double>

    <sys:Double x:Key="ScrollBarButtonArrowIconFontSize">8</sys:Double>
    <sys:TimeSpan x:Key="ScrollBarExpandBeginTime">00:00:00.40</sys:TimeSpan>
    <sys:TimeSpan x:Key="ScrollBarContractBeginTime">00:00:00.50</sys:TimeSpan>
    <CornerRadius x:Key="ScrollBarCornerRadius">3</CornerRadius>

    <sys:Double x:Key="SmallScrollThumbScale">0.125</sys:Double>
    <sys:Double x:Key="SmallScrollThumbOffset">-2</sys:Double>

    <Style x:Key="RepeatButtonTransparent" TargetType="RepeatButton">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Rectangle
                        Width="{TemplateBinding Width}"
                        Height="{TemplateBinding Height}"
                        Fill="{TemplateBinding Background}"
                        SnapsToDevicePixels="True" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="ScrollBarButtonTemplate" TargetType="RepeatButton">
        <Border
            x:Name="Root"
            Background="{DynamicResource ScrollBarButtonBackground}"
            BorderBrush="{DynamicResource ScrollBarButtonBorderBrush}"
            Padding="{TemplateBinding Padding}"
            SnapsToDevicePixels="True">
            <local:FontIconFallback
                x:Name="Arrow"
                FontFamily="{DynamicResource SymbolThemeFontFamily}"
                Data="{TemplateBinding Content}"
                Foreground="{DynamicResource ScrollBarButtonArrowForeground}"
                FontSize="{StaticResource ScrollBarButtonArrowIconFontSize}" />
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="Arrow" Property="Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundPointerOver}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="Arrow" Property="Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundPressed}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Arrow" Property="Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundDisabled}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
        <Rectangle
            x:Name="ThumbVisual"
            Fill="{TemplateBinding Background}"
            Stroke="{TemplateBinding BorderBrush}"
            StrokeThickness="{DynamicResource ScrollBarThumbStrokeThickness}"
            RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
            RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}"
            SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="{StaticResource ScrollBarColorChangeDuration}" Value="{DynamicResource ScrollBarThumbFillDisabled}" />
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ThumbVisual" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
        </Rectangle>
    </ControlTemplate>

    <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
        <Rectangle
            x:Name="ThumbVisual"
            Fill="{TemplateBinding Background}"
            Stroke="{TemplateBinding BorderBrush}"
            StrokeThickness="{DynamicResource ScrollBarThumbStrokeThickness}"
            RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
            RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}"
            SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="{StaticResource ScrollBarColorChangeDuration}" Value="{DynamicResource ScrollBarThumbFillDisabled}" />
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ThumbVisual" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
        </Rectangle>
    </ControlTemplate>

    <Style x:Key="DefaultScrollBarStyle" TargetType="ScrollBar">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Width" Value="{StaticResource ScrollBarSize}" />
        <Setter Property="MinWidth" Value="{StaticResource ScrollBarSize}" />
        <Setter Property="Margin" Value="{StaticResource ScrollBarMargin}"/>
        <Setter Property="Background" Value="{DynamicResource ScrollBarBackground}" />
        <Setter Property="Foreground" Value="{DynamicResource ScrollBarForeground}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrush}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="primitives:ControlHelper.CornerRadius" Value="{DynamicResource ScrollBarCornerRadius}" />
        <Setter Property="primitives:ScrollBarHelper.IndicatorMode" Value="MouseIndicator" />
        <Setter Property="primitives:ScrollBarHelper.AutoHide" Value="{DynamicResource AutoHideScrollBars}" />
        <Setter Property="primitives:ScrollBarHelper.IsEnabled" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <ControlTemplate.Resources>
                        <StreamGeometry x:Key="CaretUp">F1 M 10 5 L 20 15 L 0 15 L 10 5 Z</StreamGeometry>
                        <StreamGeometry x:Key="CaretDown">F1 M 0 5 L 20 5 L 10 15 L 0 5 Z</StreamGeometry>
                    </ControlTemplate.Resources>
                    <Border
                        x:Name="Root"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}"
                        SnapsToDevicePixels="true">
                        <Border.Resources>
                            <Storyboard x:Key="ExpandedToCollapsedStoryboard">
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineDownButton" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="VerticalLargeIncrease" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="VerticalLargeDecrease" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineUpButton" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="VerticalTrackRect" Storyboard.TargetProperty="Opacity" To="0" />

                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Width" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarContractDuration}" Value="{StaticResource ScrollBarVerticalThumbMinWidth}" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumbTransform" Storyboard.TargetProperty="X" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarContractDuration}" Value="{StaticResource ScrollBarThumbOffset}" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="ExpandedStoryboard">
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineDownButton" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="VerticalLargeIncrease" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="VerticalLargeDecrease" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineUpButton" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="VerticalTrackRect" Storyboard.TargetProperty="Opacity" To="1" />

                                <!-- Because of the blurriness caused by SCALE animation performed on the object with rounded corners, we have to use dependent animation on width to rerasterize the mask on every tick of the animation.-->
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Width" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarExpandDuration}" Value="{StaticResource ScrollBarSize}" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumbTransform" Storyboard.TargetProperty="X" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarExpandDuration}" Value="0" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <!-- The storyboard below cannot be moved to a transition since transitions
                                             will not be run by the framework when animations are disabled in the system -->
                            <Storyboard x:Key="ExpandedWithoutAnimationStoryboard">
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineDownButton" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="VerticalLargeIncrease" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="VerticalLargeDecrease" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineUpButton" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="VerticalTrackRect" Storyboard.TargetProperty="Opacity" To="1" />

                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Width" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="0" Value="{StaticResource ScrollBarSize}" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>

                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumbTransform" Storyboard.TargetProperty="X" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="0" Value="0" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="CollapsedWithoutAnimationStoryboard">
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineDownButton" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="VerticalLargeIncrease" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="VerticalLargeDecrease" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineUpButton" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="VerticalTrackRect" Storyboard.TargetProperty="Opacity" To="0" />

                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Width" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="0" Value="{StaticResource ScrollBarVerticalThumbMinWidth}" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>

                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumbTransform" Storyboard.TargetProperty="X" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                    <SplineDoubleKeyFrame KeyTime="0" Value="{StaticResource ScrollBarThumbOffset}" KeySpline="0,0,0,1" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </Border.Resources>
                        <VisualStateManager.CustomVisualStateManager>
                            <root:SimpleVisualStateManager />
                        </VisualStateManager.CustomVisualStateManager>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ConsciousStates">
                                <primitives:VisualStateGroupListener.Listener>
                                    <primitives:VisualStateGroupListener x:Name="ConsciousStatesListener" />
                                </primitives:VisualStateGroupListener.Listener>
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Expanded" To="Collapsed" Storyboard="{StaticResource ExpandedToCollapsedStoryboard}" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Collapsed" />
                                <VisualState x:Name="Expanded" Storyboard="{StaticResource ExpandedStoryboard}" />
                                <VisualState x:Name="ExpandedWithoutAnimation" Storyboard="{StaticResource ExpandedWithoutAnimationStoryboard}" />
                                <VisualState x:Name="CollapsedWithoutAnimation" Storyboard="{StaticResource CollapsedWithoutAnimationStoryboard}" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Rectangle
                                x:Name="VerticalTrackRect"
                                RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter2x}}"
                                RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter2x}}"
                                Opacity="0"
                                Grid.RowSpan="3"
                                Margin="0"
                                StrokeThickness="{DynamicResource ScrollBarTrackBorderThemeThickness}"
                                Fill="{DynamicResource ScrollBarTrackFill}"
                                Stroke="{DynamicResource ScrollBarTrackStroke}" />
                            <!-- VerticalSmallDecrease -->
                            <RepeatButton
                                x:Name="PART_LineUpButton"
                                Command="{x:Static ScrollBar.LineUpCommand}"
                                Grid.Row="0"
                                Opacity="0"
                                Height="{StaticResource ScrollBarSize}"
                                MinWidth="{StaticResource ScrollBarSize}"
                                IsTabStop="False"
                                Content="{StaticResource CaretUp}"
                                Padding="{DynamicResource ScrollBarVerticalDecreaseMargin}"
                                Template="{StaticResource ScrollBarButtonTemplate}"
                                HorizontalAlignment="Center" />
                            <Track
                                x:Name="PART_Track"
                                Grid.Row="1"
                                IsDirectionReversed="true">
                                <Track.Resources>
                                    <!-- Twice of ScrollBarVerticalThumbMinHeight -->
                                    <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">60</sys:Double>
                                </Track.Resources>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton
                                        x:Name="VerticalLargeDecrease"
                                        Command="{x:Static ScrollBar.PageUpCommand}"
                                        Style="{StaticResource RepeatButtonTransparent}"
                                        Opacity="0" />
                                </Track.DecreaseRepeatButton>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton
                                        x:Name="VerticalLargeIncrease"
                                        Command="{x:Static ScrollBar.PageDownCommand}"
                                        Style="{StaticResource RepeatButtonTransparent}"
                                        Opacity="0" />
                                </Track.IncreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb
                                        x:Name="VerticalThumb"
                                        Background="{DynamicResource ScrollBarPanningThumbBackground}"
                                        BorderBrush="{DynamicResource ScrollBarThumbBorderBrush}"
                                        Template="{StaticResource VerticalThumbTemplate}"
                                        Width="{StaticResource ScrollBarVerticalThumbMinWidth}"
                                        MinHeight="{StaticResource ScrollBarVerticalThumbMinHeight}"
                                        RenderTransformOrigin="1,0.5"
                                        primitives:ControlHelper.CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}">
                                        <Thumb.RenderTransform>
                                            <TranslateTransform x:Name="VerticalThumbTransform" X="{StaticResource ScrollBarThumbOffset}" />
                                        </Thumb.RenderTransform>
                                    </Thumb>
                                </Track.Thumb>
                            </Track>
                            <!-- VerticalSmallIncrease -->
                            <RepeatButton
                                x:Name="PART_LineDownButton"
                                Command="{x:Static ScrollBar.LineDownCommand}"
                                Grid.Row="2"
                                Opacity="0"
                                Height="{StaticResource ScrollBarSize}"
                                MinWidth="{StaticResource ScrollBarSize}"
                                IsTabStop="False"
                                Content="{StaticResource CaretDown}"
                                Padding="{DynamicResource ScrollBarVerticalIncreaseMargin}"
                                Template="{StaticResource ScrollBarButtonTemplate}"
                                HorizontalAlignment="Center" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger SourceName="ConsciousStatesListener" Property="CurrentStateName" Value="Expanded">
                            <Setter TargetName="Root" Property="Background" Value="{DynamicResource ScrollBarBackgroundPointerOver}" />
                            <Setter TargetName="Root" Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrushPointerOver}" />
                            <Setter TargetName="VerticalTrackRect" Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokePointerOver}" />
                            <Setter TargetName="VerticalTrackRect" Property="Fill" Value="{DynamicResource ScrollBarTrackFillPointerOver}" />
                            <Setter TargetName="VerticalThumb" Property="Background" Value="{DynamicResource ScrollBarThumbBackground}" />
                        </Trigger>
                        <Trigger SourceName="ConsciousStatesListener" Property="CurrentStateName" Value="ExpandedWithoutAnimation">
                            <Setter TargetName="Root" Property="Background" Value="{DynamicResource ScrollBarBackgroundPointerOver}" />
                            <Setter TargetName="Root" Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrushPointerOver}" />
                            <Setter TargetName="VerticalTrackRect" Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokePointerOver}" />
                            <Setter TargetName="VerticalTrackRect" Property="Fill" Value="{DynamicResource ScrollBarTrackFillPointerOver}" />
                            <Setter TargetName="VerticalThumb" Property="Background" Value="{DynamicResource ScrollBarThumbBackground}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Root" Property="Background" Value="{DynamicResource ScrollBarBackgroundDisabled}" />
                            <Setter TargetName="Root" Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrushDisabled}" />
                            <Setter TargetName="Root" Property="Opacity" Value="0.5" />
                            <Setter TargetName="VerticalTrackRect" Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokeDisabled}" />
                            <Setter TargetName="VerticalTrackRect" Property="Fill" Value="{DynamicResource ScrollBarTrackFillDisabled}" />
                            <Setter TargetName="PART_LineUpButton" Property="Visibility" Value="Hidden" />
                            <Setter TargetName="PART_LineDownButton" Property="Visibility" Value="Hidden" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto" />
                <Setter Property="MinWidth" Value="0" />
                <Setter Property="Height" Value="{StaticResource ScrollBarSize}" />
                <Setter Property="MinHeight" Value="{StaticResource ScrollBarSize}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ScrollBar">
                            <ControlTemplate.Resources>
                                <StreamGeometry x:Key="CaretLeft">F1 M 5 10 L 15 0 L 15 20 L 5 10 Z</StreamGeometry>
                                <StreamGeometry x:Key="CaretRight">F1 M 5 0 L 15 10 L 5 20 L 5 0 Z</StreamGeometry>
                            </ControlTemplate.Resources>
                            <Border
                                x:Name="Root"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                SnapsToDevicePixels="true">
                                <Border.Resources>
                                    <Storyboard x:Key="ExpandedToCollapsedStoryboard">
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineRightButton" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="HorizontalLargeIncrease" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="HorizontalLargeDecrease" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineLeftButton" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="HorizontalTrackRect" Storyboard.TargetProperty="Opacity" To="0" />

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Height" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarContractDuration}" Value="{StaticResource ScrollBarHorizontalThumbMinHeight}" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumbTransform" Storyboard.TargetProperty="Y" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarContractDuration}" Value="{StaticResource ScrollBarThumbOffset}" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="ExpandedStoryboard">
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineRightButton" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="HorizontalLargeIncrease" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="HorizontalLargeDecrease" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineLeftButton" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="{StaticResource ScrollBarOpacityChangeDuration}" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="HorizontalTrackRect" Storyboard.TargetProperty="Opacity" To="1" />

                                        <!-- Because of the blurriness caused by SCALE animation performed on the object with rounded corners, we have to use dependent animation on width to rerasterize the mask on every tick of the animation.-->
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Height" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarExpandDuration}" Value="{StaticResource ScrollBarSize}" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumbTransform" Storyboard.TargetProperty="Y" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ScrollBarExpandDuration}" Value="0" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <!-- The storyboard below cannot be moved to a transition since transitions
                                             will not be run by the framework when animations are disabled in the system -->
                                    <Storyboard x:Key="ExpandedWithoutAnimationStoryboard">
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineRightButton" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="HorizontalLargeIncrease" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="HorizontalLargeDecrease" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="PART_LineLeftButton" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarExpandBeginTime}" Storyboard.TargetName="HorizontalTrackRect" Storyboard.TargetProperty="Opacity" To="1" />
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Height" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="{StaticResource ScrollBarSize}" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumbTransform" Storyboard.TargetProperty="Y" BeginTime="{StaticResource ScrollBarExpandBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="CollapsedWithoutAnimationStoryboard">
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineRightButton" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="HorizontalLargeIncrease" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="HorizontalLargeDecrease" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="PART_LineLeftButton" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimation Duration="0" BeginTime="{StaticResource ScrollBarContractBeginTime}" Storyboard.TargetName="HorizontalTrackRect" Storyboard.TargetProperty="Opacity" To="0" />
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Height" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="{StaticResource ScrollBarHorizontalThumbMinHeight}" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumbTransform" Storyboard.TargetProperty="Y" BeginTime="{StaticResource ScrollBarContractBeginTime}">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="{StaticResource ScrollBarThumbOffset}" KeySpline="0,0,0,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </Border.Resources>
                                <VisualStateManager.CustomVisualStateManager>
                                    <root:SimpleVisualStateManager />
                                </VisualStateManager.CustomVisualStateManager>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="ConsciousStates">
                                        <primitives:VisualStateGroupListener.Listener>
                                            <primitives:VisualStateGroupListener x:Name="ConsciousStatesListener" />
                                        </primitives:VisualStateGroupListener.Listener>
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition From="Expanded" To="Collapsed" Storyboard="{StaticResource ExpandedToCollapsedStoryboard}" />
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Collapsed" />
                                        <VisualState x:Name="Expanded" Storyboard="{StaticResource ExpandedStoryboard}" />
                                        <VisualState x:Name="ExpandedWithoutAnimation" Storyboard="{StaticResource ExpandedWithoutAnimationStoryboard}" />
                                        <VisualState x:Name="CollapsedWithoutAnimation" Storyboard="{StaticResource CollapsedWithoutAnimationStoryboard}" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Rectangle
                                        x:Name="HorizontalTrackRect"
                                        RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter2x}}"
                                        RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter2x}}"
                                        Opacity="0"
                                        Grid.ColumnSpan="3"
                                        Margin="0"
                                        StrokeThickness="{DynamicResource ScrollBarTrackBorderThemeThickness}"
                                        Fill="{DynamicResource ScrollBarTrackFill}"
                                        Stroke="{DynamicResource ScrollBarTrackStroke}" />
                                    <!-- HorizontalSmallDecrease -->
                                    <RepeatButton
                                        x:Name="PART_LineLeftButton"
                                        Command="{x:Static ScrollBar.LineLeftCommand}"
                                        Grid.Column="0"
                                        Opacity="0"
                                        MinHeight="{StaticResource ScrollBarSize}"
                                        IsTabStop="False"
                                        Content="{StaticResource CaretLeft}"
                                        Padding="{DynamicResource ScrollBarHorizontalDecreaseMargin}"
                                        Template="{StaticResource ScrollBarButtonTemplate}"
                                        Width="{StaticResource ScrollBarSize}"
                                        VerticalAlignment="Center" />
                                    <Track
                                        x:Name="PART_Track"
                                        Grid.Column="1">
                                        <Track.Resources>
                                            <!-- Twice of ScrollBarHorizontalThumbMinWidth -->
                                            <sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}">60</sys:Double>
                                        </Track.Resources>
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton
                                                x:Name="HorizontalLargeDecrease"
                                                Command="{x:Static ScrollBar.PageLeftCommand}"
                                                Style="{StaticResource RepeatButtonTransparent}"
                                                Opacity="0" />
                                        </Track.DecreaseRepeatButton>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton
                                                x:Name="HorizontalLargeIncrease"
                                                Command="{x:Static ScrollBar.PageRightCommand}"
                                                Style="{StaticResource RepeatButtonTransparent}"
                                                Opacity="0" />
                                        </Track.IncreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb
                                                x:Name="HorizontalThumb"
                                                Background="{DynamicResource ScrollBarPanningThumbBackground}"
                                                BorderBrush="{DynamicResource ScrollBarThumbBorderBrush}"
                                                Template="{StaticResource HorizontalThumbTemplate}"
                                                Height="{StaticResource ScrollBarHorizontalThumbMinHeight}"
                                                MinWidth="{StaticResource ScrollBarHorizontalThumbMinWidth}"
                                                RenderTransformOrigin="0.5,1"
                                                primitives:ControlHelper.CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}">
                                                <Thumb.RenderTransform>
                                                    <TranslateTransform x:Name="HorizontalThumbTransform" Y="{StaticResource ScrollBarThumbOffset}" />
                                                </Thumb.RenderTransform>
                                            </Thumb>
                                        </Track.Thumb>
                                    </Track>
                                    <!-- HorizontalSmallIncrease -->
                                    <RepeatButton
                                        x:Name="PART_LineRightButton"
                                        Command="{x:Static ScrollBar.LineRightCommand}"
                                        Grid.Column="2"
                                        Opacity="0"
                                        MinHeight="{StaticResource ScrollBarSize}"
                                        IsTabStop="False"
                                        Content="{StaticResource CaretRight}"
                                        Padding="{DynamicResource ScrollBarHorizontalIncreaseMargin}"
                                        Template="{StaticResource ScrollBarButtonTemplate}"
                                        Width="{StaticResource ScrollBarSize}"
                                        VerticalAlignment="Center" />
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger SourceName="ConsciousStatesListener" Property="CurrentStateName" Value="Expanded">
                                    <Setter TargetName="Root" Property="Background" Value="{DynamicResource ScrollBarBackgroundPointerOver}" />
                                    <Setter TargetName="Root" Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrushPointerOver}" />
                                    <Setter TargetName="HorizontalTrackRect" Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokePointerOver}" />
                                    <Setter TargetName="HorizontalTrackRect" Property="Fill" Value="{DynamicResource ScrollBarTrackFillPointerOver}" />
                                    <Setter TargetName="HorizontalThumb" Property="Background" Value="{DynamicResource ScrollBarThumbBackground}" />
                                </Trigger>
                                <Trigger SourceName="ConsciousStatesListener" Property="CurrentStateName" Value="ExpandedWithoutAnimation">
                                    <Setter TargetName="Root" Property="Background" Value="{DynamicResource ScrollBarBackgroundPointerOver}" />
                                    <Setter TargetName="Root" Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrushPointerOver}" />
                                    <Setter TargetName="HorizontalTrackRect" Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokePointerOver}" />
                                    <Setter TargetName="HorizontalTrackRect" Property="Fill" Value="{DynamicResource ScrollBarTrackFillPointerOver}" />
                                    <Setter TargetName="HorizontalThumb" Property="Background" Value="{DynamicResource ScrollBarThumbBackground}" />
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter TargetName="Root" Property="Background" Value="{DynamicResource ScrollBarBackgroundDisabled}" />
                                    <Setter TargetName="Root" Property="BorderBrush" Value="{DynamicResource ScrollBarBorderBrushDisabled}" />
                                    <Setter TargetName="Root" Property="Opacity" Value="0.5" />
                                    <Setter TargetName="HorizontalTrackRect" Property="Stroke" Value="{DynamicResource ScrollBarTrackStrokeDisabled}" />
                                    <Setter TargetName="HorizontalTrackRect" Property="Fill" Value="{DynamicResource ScrollBarTrackFillDisabled}" />
                                    <Setter TargetName="PART_LineLeftButton" Property="Visibility" Value="Hidden" />
                                    <Setter TargetName="PART_LineRightButton" Property="Visibility" Value="Hidden" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="ScrollBar" BasedOn="{StaticResource DefaultScrollBarStyle}" />

</ResourceDictionary>