<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <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 BackgroundColor.DetailsPage.Widget.Value}"
                            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 BackgroundColor.DetailsPage.Widget.Value}"
                            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="Background"
                Value="{DynamicResource Color.Menu.Icon}" />
        <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="{TemplateBinding Background}"
                            Padding="2">
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter TargetName="ThumbBorder"
                                    Property="Height"
                                    Value="17.5" />
                            <Setter TargetName="ThumbBorder"
                                    Property="Width"
                                    Value="17.5" />
                            <Setter TargetName="ThumbBorder"
                                    Property="CornerRadius"
                                    Value="13" />
                            <Setter Property="Cursor"
                                    Value="Hand" />
                        </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>
            <TickBar x:Name="TopTick"
                     SnapsToDevicePixels="True"
                     Placement="Top"
                     Opacity=".4"
                     Height="5"
                     Visibility="Collapsed"
                     Margin="0 0 0 -20"
                     Fill="{DynamicResource Color.Menu.Icon}">
            </TickBar>

            <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}"
                           Background="{TemplateBinding Background}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton Style="{StaticResource SliderRepeatButton}"
                                  Command="Slider.IncreaseLarge" />
                </Track.IncreaseRepeatButton>
            </Track>

            <TickBar x:Name="BottomTick"
                     SnapsToDevicePixels="True"
                     Grid.Row="2"
                     Fill="{DynamicResource Color.Menu.Icon}"
                     Opacity="0.5"
                     Placement="Bottom"
                     Margin="0 -15 0 0"
                     Height="7.5"
                     Visibility="Collapsed" />
        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="TickPlacement"
                     Value="TopLeft">
                <Setter TargetName="TopTick"
                        Property="Visibility"
                        Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement"
                     Value="BottomRight">
                <Setter TargetName="BottomTick"
                        Property="Visibility"
                        Value="Visible" />
            </Trigger>
            <Trigger Property="TickPlacement"
                     Value="Both">
                <Setter TargetName="TopTick"
                        Property="Visibility"
                        Value="Visible" />
                <Setter TargetName="BottomTick"
                        Property="Visibility"
                        Value="Visible" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Name="CustomSlider"
           TargetType="Slider">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="SnapsToDevicePixels"
                Value="true" />
        <Setter Property="OverridesDefaultStyle"
                Value="true" />
        <Setter Property="Background"
                Value="{DynamicResource Color.Menu.Icon}" />

        <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>