<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib">


    <Style x:Key="SliderRepeatButton" TargetType="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="RepeatButton">
                    <Border x:Name="RightSliderBorder" Background="{DynamicResource colorF2F2F2}" Height="5"  BorderThickness="1"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SliderRepeatButton1" TargetType="RepeatButton">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border x:Name="LeftSliderBorder" SnapsToDevicePixels="True" Background="{DynamicResource colorF2F2F2}" Height="5"  BorderThickness="1"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SliderThumb" TargetType="Thumb">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <!--Add name to ellipse to use in  controltemplate triggers-->
                    <Border x:Name="ThumbBorder" Height="15" Width="15" CornerRadius="10" VerticalAlignment="Center" HorizontalAlignment="Center" Background="{DynamicResource color3D3C3C}" Padding="2">
                        <TextBlock x:Name="ThumbBorderText" FontSize="12" FontWeight="DemiBold" Foreground="{DynamicResource colorF7FAFA}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed" Text="{Binding RelativeSource={RelativeSource AncestorType=Slider, AncestorLevel=1}, Path=Value, StringFormat=N0}">
                            <!--<TextBlock.Text>
                                <Binding ElementName="CustomSlider" Path="Value"/>
                            </TextBlock.Text>-->
                        </TextBlock>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="ThumbBorder" Property="Height" Value="27"></Setter>
                            <Setter TargetName="ThumbBorder" Property="Width" Value="27"></Setter>
                            <Setter TargetName="ThumbBorder" Property="CornerRadius" Value="13"></Setter>
                            <Setter Property="Cursor" Value="Hand"></Setter>
                            <Setter TargetName="ThumbBorderText" Property="Visibility" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="Slider"  TargetType="Slider">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="30"/>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Track Grid.Row="1" x:Name="PART_Track"   >
                <Track.DecreaseRepeatButton>
                    <RepeatButton Style="{StaticResource SliderRepeatButton1}"  Command="Slider.DecreaseLarge" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource SliderThumb}"  />
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource SliderRepeatButton}" Command="Slider.IncreaseLarge" />
                </Track.IncreaseRepeatButton>
            </Track>
        </Grid>
    </ControlTemplate>

    <Style x:Name="CustomSlider" TargetType="Slider">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Minimum" Value="50"/>
        <Setter Property="Maximum" Value="200"/>
        <Setter Property="Value" Value="100"/>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="MinHeight" Value="21" />
                <Setter Property="MinWidth" Value="104" />
                <Setter Property="Template" Value="{StaticResource Slider}" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>