<!-- 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:local="clr-namespace:ModernWpf.Controls"
    xmlns:primitives="clr-namespace:ModernWpf.Controls.Primitives"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Common.xaml" />
        <ResourceDictionary Source="ToolTip.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Thickness x:Key="SliderTopHeaderMargin">0,0,0,4</Thickness>
    <CornerRadius x:Key="SliderTrackCornerRadius">2</CornerRadius>
    <CornerRadius x:Key="SliderThumbCornerRadius">10</CornerRadius>
    <sys:Double x:Key="SliderPreContentMargin">15</sys:Double>
    <sys:Double x:Key="SliderPostContentMargin">15</sys:Double>
    <sys:Double x:Key="SliderHorizontalHeight">32</sys:Double>
    <sys:Double x:Key="SliderVerticalWidth">32</sys:Double>
    <sys:Double x:Key="SliderHorizontalThumbWidth">20</sys:Double>
    <sys:Double x:Key="SliderHorizontalThumbHeight">20</sys:Double>
    <sys:Double x:Key="SliderVerticalThumbWidth">20</sys:Double>
    <sys:Double x:Key="SliderVerticalThumbHeight">20</sys:Double>
    <sys:Double x:Key="SliderInnerThumbWidth">12</sys:Double>
    <sys:Double x:Key="SliderInnerThumbHeight">12</sys:Double>

    <primitives:CornerRadiusFilterConverter x:Key="TopLeftCornerRadiusDoubleValueConverter" Filter="TopLeftValue" />
    <primitives:CornerRadiusFilterConverter x:Key="BottomRightCornerRadiusDoubleValueConverter" Filter="BottomRightValue" />

    <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}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Thumb" x:Key="SliderThumbStyle">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="{DynamicResource SliderThumbBackground}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border
                        Margin="-1"
                        Background="{DynamicResource SliderOuterThumbBackground}"
                        BorderBrush="{DynamicResource SliderThumbBorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{DynamicResource SliderThumbCornerRadius}">
                        <Ellipse
                            x:Name="SliderInnerThumb"
                            RenderTransformOrigin="0.5, 0.5"
                            Fill="{TemplateBinding Background}"                                                  
                            Width="{DynamicResource SliderInnerThumbWidth}"
                            Height="{DynamicResource SliderInnerThumbHeight}">
                            <Ellipse.RenderTransform>
                                <ScaleTransform />
                            </Ellipse.RenderTransform>
                        </Ellipse>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <!-- 0.86 is relative scale from 14px to 12px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlFasterAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="0.86" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <!-- 0.86 is relative scale from 14px to 12px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlFasterAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="0.86" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <!-- 1.167 is relative scale from 12px to 14px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="1.167" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <!-- 1.167 is relative scale from 12px to 14px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="1.167" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <!-- 0.71 is relative scale from 14px to 10px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="0.71" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <!-- 0.71 is relative scale from 14px to 10px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="0.71" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <!-- 1.167 is relative scale from 12px to 14px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlFasterAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="1.167" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SliderInnerThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <!-- 1.167 is relative scale from 12px to 14px -->
                                            <SplineDoubleKeyFrame KeyTime="{StaticResource ControlFasterAnimationDuration}" KeySpline="{StaticResource ControlFastOutSlowInKeySpline}" Value="1.167" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SliderAutoToolTipStyle" TargetType="ToolTip" BasedOn="{StaticResource DefaultToolTipStyle}">
        <Setter Property="primitives:SliderAutoToolTipHelper.IsEnabled" Value="True" />
    </Style>

    <ControlTemplate x:Key="SliderHorizontal" TargetType="Slider">
        <Grid
            Margin="{TemplateBinding Padding}"
            SnapsToDevicePixels="True">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <local:ContentPresenterEx
                x:Name="HeaderContentPresenter"
                Grid.Row="0"
                Content="{TemplateBinding primitives:ControlHelper.Header}"
                ContentTemplate="{TemplateBinding primitives:ControlHelper.HeaderTemplate}"
                FontWeight="{DynamicResource SliderHeaderThemeFontWeight}"
                Foreground="{DynamicResource SliderHeaderForeground}"
                Margin="{DynamicResource SliderTopHeaderMargin}"
                TextWrapping="Wrap"
                Visibility="{TemplateBinding primitives:ControlHelper.HeaderVisibility}"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
            <Border
                x:Name="SliderContainer"
                Grid.Row="1"
                Background="{DynamicResource SliderContainerBackground}"
                primitives:FocusVisualHelper.IsTemplateFocusTarget="True"
                CornerRadius="{DynamicResource ControlCornerRadius}">
                <Grid
                    x:Name="HorizontalTemplate"
                    MinHeight="{DynamicResource SliderHorizontalHeight}">

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>
                        <RowDefinition primitives:RowDefinitionHelper.PixelHeight="{DynamicResource SliderPreContentMargin}" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition primitives:RowDefinitionHelper.PixelHeight="{DynamicResource SliderPostContentMargin}" />
                    </Grid.RowDefinitions>

                    <Rectangle
                        x:Name="HorizontalTrackRect"
                        Fill="{TemplateBinding Background}"
                        Height="{DynamicResource SliderTrackThemeHeight}"
                        Grid.Row="1"
                        Grid.ColumnSpan="3"
                        RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
                        RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}" />
                    <Rectangle
                        x:Name="HorizontalDecreaseRect"
                        Width="{Binding ActualWidth, ElementName=HorizontalDecrease}"
                        Fill="{TemplateBinding Foreground}"
                        Grid.Row="1"
                        RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
                        RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}" />
                    <TickBar
                        x:Name="TopTickBar"
                        Placement="Top"
                        Visibility="Collapsed"
                        Fill="{DynamicResource SliderTickBarFill}"
                        Height="{DynamicResource SliderOutsideTickBarThemeHeight}"
                        VerticalAlignment="Bottom"
                        Margin="0,0,0,4"
                        Grid.ColumnSpan="3" />
                    <TickBar
                        x:Name="BottomTickBar"
                        Placement="Bottom"
                        Visibility="Collapsed"
                        Fill="{DynamicResource SliderTickBarFill}"
                        Height="{DynamicResource SliderOutsideTickBarThemeHeight}"
                        VerticalAlignment="Top"
                        Margin="0,4,0,0"
                        Grid.Row="2"
                        Grid.ColumnSpan="3" />
                    <Track
                        x:Name="PART_Track"
                        Grid.Row="0"
                        Grid.RowSpan="3"
                        Grid.Column="0"
                        Grid.ColumnSpan="3">
                        <Track.DecreaseRepeatButton>
                            <RepeatButton
                                x:Name="HorizontalDecrease"
                                Command="{x:Static Slider.DecreaseLarge}"
                                Style="{StaticResource RepeatButtonTransparent}" />
                        </Track.DecreaseRepeatButton>
                        <Track.IncreaseRepeatButton>
                            <RepeatButton
                                Command="{x:Static Slider.IncreaseLarge}"
                                Style="{StaticResource RepeatButtonTransparent}" />
                        </Track.IncreaseRepeatButton>
                        <Track.Thumb>
                            <Thumb
                                x:Name="HorizontalThumb"
                                Style="{StaticResource SliderThumbStyle}"
                                DataContext="{TemplateBinding Value}"
                                Height="{DynamicResource SliderHorizontalThumbHeight}"
                                Width="{DynamicResource SliderHorizontalThumbWidth}"
                                primitives:ControlHelper.CornerRadius="{DynamicResource ControlCornerRadius}"
                                primitives:FocusVisualHelper.FocusVisualMargin="-14,-6,-14,-6">
                                <Thumb.Resources>
                                    <Style TargetType="ToolTip" BasedOn="{StaticResource SliderAutoToolTipStyle}" />
                                </Thumb.Resources>
                            </Thumb>
                        </Track.Thumb>
                    </Track>
                </Grid>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="TopTickBar" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="BottomTickBar" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="TopTickBar" Property="Visibility" Value="Visible" />
                <Setter TargetName="BottomTickBar" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="HorizontalTrackRect" Property="Fill" Value="{DynamicResource SliderTrackFillPointerOver}" />
                <Setter TargetName="HorizontalThumb" Property="Background" Value="{DynamicResource SliderThumbBackgroundPointerOver}" />
                <Setter TargetName="SliderContainer" Property="Background" Value="{DynamicResource SliderContainerBackgroundPointerOver}" />
                <Setter TargetName="HorizontalDecreaseRect" Property="Fill" Value="{DynamicResource SliderTrackValueFillPointerOver}" />
            </Trigger>
            <Trigger SourceName="HorizontalThumb" Property="IsDragging" Value="True">
                <Setter TargetName="HorizontalTrackRect" Property="Fill" Value="{DynamicResource SliderTrackFillPressed}" />
                <Setter TargetName="HorizontalThumb" Property="Background" Value="{DynamicResource SliderThumbBackgroundPressed}" />
                <Setter TargetName="SliderContainer" Property="Background" Value="{DynamicResource SliderContainerBackgroundPressed}" />
                <Setter TargetName="HorizontalDecreaseRect" Property="Fill" Value="{DynamicResource SliderTrackValueFillPressed}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource SliderHeaderForegroundDisabled}" />
                <Setter TargetName="HorizontalDecreaseRect" Property="Fill" Value="{DynamicResource SliderTrackValueFillDisabled}" />
                <Setter TargetName="HorizontalTrackRect" Property="Fill" Value="{DynamicResource SliderTrackFillDisabled}" />
                <Setter TargetName="HorizontalThumb" Property="Background" Value="{DynamicResource SliderThumbBackgroundDisabled}" />
                <Setter TargetName="TopTickBar" Property="Fill" Value="{DynamicResource SliderTickBarFillDisabled}" />
                <Setter TargetName="BottomTickBar" Property="Fill" Value="{DynamicResource SliderTickBarFillDisabled}" />
                <Setter TargetName="SliderContainer" Property="Background" Value="{DynamicResource SliderContainerBackgroundDisabled}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="SliderVertical" TargetType="Slider">
        <Grid
            Margin="{TemplateBinding Padding}"
            SnapsToDevicePixels="True">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <local:ContentPresenterEx
                x:Name="HeaderContentPresenter"
                Grid.Row="0"
                Content="{TemplateBinding primitives:ControlHelper.Header}"
                ContentTemplate="{TemplateBinding primitives:ControlHelper.HeaderTemplate}"
                FontWeight="{DynamicResource SliderHeaderThemeFontWeight}"
                Foreground="{DynamicResource SliderHeaderForeground}"
                Margin="{DynamicResource SliderTopHeaderMargin}"
                TextWrapping="Wrap"
                Visibility="{TemplateBinding primitives:ControlHelper.HeaderVisibility}"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
            </local:ContentPresenterEx>
            <Border
                x:Name="SliderContainer"
                Grid.Row="1"
                Background="{DynamicResource SliderContainerBackground}"
                primitives:FocusVisualHelper.IsTemplateFocusTarget="True"
                CornerRadius="{DynamicResource ControlCornerRadius}">
                <Grid
                    x:Name="VerticalTemplate"
                    MinWidth="{DynamicResource SliderVerticalWidth}">

                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition primitives:ColumnDefinitionHelper.PixelWidth="{DynamicResource SliderPreContentMargin}" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition primitives:ColumnDefinitionHelper.PixelWidth="{DynamicResource SliderPostContentMargin}" />
                    </Grid.ColumnDefinitions>

                    <Rectangle
                        x:Name="VerticalTrackRect"
                        Fill="{TemplateBinding Background}"
                        Width="{DynamicResource SliderTrackThemeHeight}"
                        Grid.Column="1"
                        Grid.RowSpan="3"
                        RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
                        RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}" />
                    <Rectangle
                        x:Name="VerticalDecreaseRect"
                        Height="{Binding ActualHeight, ElementName=VerticalDecrease}"
                        Fill="{TemplateBinding Foreground}"
                        Grid.Column="1"
                        Grid.Row="2"
                        RadiusX="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
                        RadiusY="{TemplateBinding primitives:ControlHelper.CornerRadius, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}" />
                    <TickBar
                        x:Name="LeftTickBar"
                        Placement="Left"
                        Visibility="Collapsed"
                        Fill="{DynamicResource SliderTickBarFill}"
                        Width="{DynamicResource SliderOutsideTickBarThemeHeight}"
                        HorizontalAlignment="Right"
                        Margin="0,0,4,0"
                        Grid.RowSpan="3" />
                    <TickBar
                        x:Name="RightTickBar"
                        Placement="Right"
                        Visibility="Collapsed"
                        Fill="{DynamicResource SliderTickBarFill}"
                        Width="{DynamicResource SliderOutsideTickBarThemeHeight}"
                        HorizontalAlignment="Left"
                        Margin="4,0,0,0"
                        Grid.Column="2"
                        Grid.RowSpan="3" />
                    <Track
                        x:Name="PART_Track"
                        Grid.Row="0"
                        Grid.RowSpan="3"
                        Grid.Column="0"
                        Grid.ColumnSpan="3">
                        <Track.DecreaseRepeatButton>
                            <RepeatButton
                                x:Name="VerticalDecrease"
                                Command="{x:Static Slider.DecreaseLarge}"
                                Style="{StaticResource RepeatButtonTransparent}" />
                        </Track.DecreaseRepeatButton>
                        <Track.IncreaseRepeatButton>
                            <RepeatButton
                                Command="{x:Static Slider.IncreaseLarge}"
                                Style="{StaticResource RepeatButtonTransparent}" />
                        </Track.IncreaseRepeatButton>
                        <Track.Thumb>
                            <Thumb
                                x:Name="VerticalThumb"
                                Style="{StaticResource SliderThumbStyle}"
                                DataContext="{TemplateBinding Value}"
                                Width="{DynamicResource SliderVerticalThumbWidth}"
                                Height="{DynamicResource SliderVerticalThumbHeight}"
                                primitives:ControlHelper.CornerRadius="{DynamicResource ControlCornerRadius}"
                                primitives:FocusVisualHelper.FocusVisualMargin="-6,-14,-6,-14">
                                <Thumb.Resources>
                                    <Style TargetType="ToolTip" BasedOn="{StaticResource SliderAutoToolTipStyle}" />
                                </Thumb.Resources>
                            </Thumb>
                        </Track.Thumb>
                    </Track>
                </Grid>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="LeftTickBar" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="RightTickBar" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="LeftTickBar" Property="Visibility" Value="Visible" />
                <Setter TargetName="RightTickBar" Property="Visibility" Value="Visible" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="VerticalTrackRect" Property="Fill" Value="{DynamicResource SliderTrackFillPointerOver}" />
                <Setter TargetName="VerticalThumb" Property="Background" Value="{DynamicResource SliderThumbBackgroundPointerOver}" />
                <Setter TargetName="SliderContainer" Property="Background" Value="{DynamicResource SliderContainerBackgroundPointerOver}" />
                <Setter TargetName="VerticalDecreaseRect" Property="Fill" Value="{DynamicResource SliderTrackValueFillPointerOver}" />
            </Trigger>
            <Trigger SourceName="VerticalThumb" Property="IsDragging" Value="True">
                <Setter TargetName="VerticalTrackRect" Property="Fill" Value="{DynamicResource SliderTrackFillPressed}" />
                <Setter TargetName="VerticalThumb" Property="Background" Value="{DynamicResource SliderThumbBackgroundPressed}" />
                <Setter TargetName="SliderContainer" Property="Background" Value="{DynamicResource SliderContainerBackgroundPressed}" />
                <Setter TargetName="VerticalDecreaseRect" Property="Fill" Value="{DynamicResource SliderTrackValueFillPressed}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource SliderHeaderForegroundDisabled}" />
                <Setter TargetName="VerticalDecreaseRect" Property="Fill" Value="{DynamicResource SliderTrackValueFillDisabled}" />
                <Setter TargetName="VerticalTrackRect" Property="Fill" Value="{DynamicResource SliderTrackFillDisabled}" />
                <Setter TargetName="VerticalThumb" Property="Background" Value="{DynamicResource SliderThumbBackgroundDisabled}" />
                <Setter TargetName="LeftTickBar" Property="Fill" Value="{DynamicResource SliderTickBarFillDisabled}" />
                <Setter TargetName="RightTickBar" Property="Fill" Value="{DynamicResource SliderTickBarFillDisabled}" />
                <Setter TargetName="SliderContainer" Property="Background" Value="{DynamicResource SliderContainerBackgroundDisabled}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="DefaultSliderStyle" TargetType="Slider">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Background" Value="{DynamicResource SliderTrackFill}" />
        <Setter Property="BorderThickness" Value="{DynamicResource SliderBorderThemeThickness}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SliderThumbBorderBrush}"/>
        <Setter Property="Foreground" Value="{DynamicResource SliderTrackValueFill}" />
        <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
        <!--<Setter Property="ManipulationMode" Value="None" />-->
        <Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
        <Setter Property="primitives:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
        <Setter Property="primitives:FocusVisualHelper.FocusVisualMargin" Value="-7,0,-7,0" />
        <Setter Property="primitives:ControlHelper.CornerRadius" Value="{DynamicResource SliderTrackCornerRadius}" />
        <Setter Property="Template" Value="{StaticResource SliderHorizontal}" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template" Value="{StaticResource SliderVertical}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="Slider" BasedOn="{StaticResource DefaultSliderStyle}" />

</ResourceDictionary>