<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="clr-namespace:System;assembly=mscorlib"
        x:Key="RoundThumbSlider"
        TargetType="{x:Type Slider}">
        <Style.Triggers>
            <Trigger Property="Slider.Orientation" Value="Vertical">
                <Setter Property="Control.Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Slider}">
                            <Border
                                Name="border"
                                Background="{TemplateBinding Panel.Background}"
                                BorderBrush="{TemplateBinding Border.BorderBrush}"
                                BorderThickness="{TemplateBinding Border.BorderThickness}"
                                SnapsToDevicePixels="True">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding FrameworkElement.MinWidth}" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <TickBar
                                        Name="TopTick"
                                        Grid.Column="0"
                                        Width="4"
                                        Margin="0,0,2,0"
                                        Fill="{TemplateBinding TextElement.Foreground}"
                                        Placement="Left"
                                        Visibility="Collapsed" />
                                    <TickBar
                                        Name="BottomTick"
                                        Grid.Column="2"
                                        Width="4"
                                        Margin="2,0,0,0"
                                        Fill="{TemplateBinding TextElement.Foreground}"
                                        Placement="Right"
                                        Visibility="Collapsed" />
                                    <Border
                                        Name="TrackBackground"
                                        Grid.Column="1"
                                        Width="4"
                                        Margin="0,5"
                                        HorizontalAlignment="Center"
                                        Background="#E7EAEA"
                                        BorderBrush="#D6D6D6"
                                        BorderThickness="1">
                                        <Canvas Margin="-1,-6">
                                            <Rectangle
                                                Name="PART_SelectionRange"
                                                Width="4"
                                                Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
                                                Visibility="Hidden" />
                                        </Canvas>
                                    </Border>
                                    <Track Name="PART_Track" Grid.Column="1">
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton>
                                                <RepeatButton.Command>
                                                    <RoutedCommand />
                                                </RepeatButton.Command>
                                                <RepeatButton.Style>
                                                    <Style TargetType="{x:Type RepeatButton}">
                                                        <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
                                                        <Setter Property="Panel.Background" Value="#00FFFFFF" />
                                                        <Setter Property="UIElement.Focusable" Value="False" />
                                                        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
                                                        <Setter Property="Control.Template">
                                                            <Setter.Value>
                                                                <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                                    <Rectangle
                                                                        Width="{TemplateBinding FrameworkElement.Width}"
                                                                        Height="2"
                                                                        Fill="{TemplateBinding Panel.Background}" />
                                                                </ControlTemplate>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </RepeatButton.Style>
                                            </RepeatButton>
                                        </Track.DecreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb
                                                Name="Thumb"
                                                Width="18"
                                                Height="11"
                                                VerticalAlignment="Top"
                                                Focusable="False"
                                                OverridesDefaultStyle="True">
                                                <Thumb.Template>
                                                    <ControlTemplate TargetType="{x:Type Thumb}">
                                                        <Grid
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center"
                                                            UseLayoutRounding="True">
                                                            <Path
                                                                Name="grip"
                                                                VerticalAlignment="Center"
                                                                Fill="#477EDE"
                                                                SnapsToDevicePixels="True"
                                                                Stretch="Fill"
                                                                Stroke="#477EDE"
                                                                StrokeThickness="1"
                                                                UseLayoutRounding="True">
                                                                <Path.Data>
                                                                    <RectangleGeometry
                                                                        RadiusX="4"
                                                                        RadiusY="4"
                                                                        Rect="0,0,8,16" />
                                                                </Path.Data>
                                                            </Path>
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger Property="UIElement.IsMouseOver" Value="True">
                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                            </Trigger>
                                                            <Trigger Property="Thumb.IsDragging" Value="True">
                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                            </Trigger>
                                                            <Trigger Property="UIElement.IsEnabled" Value="False">
                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Thumb.Template>
                                            </Thumb>
                                        </Track.Thumb>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton>
                                                <RepeatButton.Command>
                                                    <RoutedCommand />
                                                </RepeatButton.Command>
                                                <RepeatButton.Style>
                                                    <Style TargetType="{x:Type RepeatButton}">
                                                        <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
                                                        <Setter Property="Panel.Background" Value="#00FFFFFF" />
                                                        <Setter Property="UIElement.Focusable" Value="False" />
                                                        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
                                                        <Setter Property="Control.Template">
                                                            <Setter.Value>
                                                                <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                                    <Rectangle
                                                                        Width="{TemplateBinding FrameworkElement.Width}"
                                                                        Height="2"
                                                                        Fill="{TemplateBinding Panel.Background}" />
                                                                </ControlTemplate>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </RepeatButton.Style>
                                            </RepeatButton>
                                        </Track.IncreaseRepeatButton>
                                    </Track>
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Slider.TickPlacement" Value="TopLeft">
                                    <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
                                    <Setter TargetName="Thumb" Property="Control.Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Center"
                                                    UseLayoutRounding="True">
                                                    <Path
                                                        Name="grip"
                                                        VerticalAlignment="Center"
                                                        Fill="#477EDE"
                                                        SnapsToDevicePixels="True"
                                                        Stretch="Fill"
                                                        Stroke="#477EDE"
                                                        StrokeThickness="1"
                                                        UseLayoutRounding="True">
                                                        <Path.Data>
                                                            <RectangleGeometry
                                                                RadiusX="4"
                                                                RadiusY="4"
                                                                Rect="0,0,8,16" />
                                                        </Path.Data>
                                                    </Path>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="UIElement.IsMouseOver" Value="True">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                    <Trigger Property="Thumb.IsDragging" Value="True">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                    <Trigger Property="UIElement.IsEnabled" Value="False">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="2,5,0,5" />
                                </Trigger>
                                <Trigger Property="Slider.TickPlacement" Value="BottomRight">
                                    <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
                                    <Setter TargetName="Thumb" Property="Control.Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Center"
                                                    UseLayoutRounding="True">
                                                    <Path
                                                        Name="grip"
                                                        VerticalAlignment="Center"
                                                        Fill="#477EDE"
                                                        SnapsToDevicePixels="True"
                                                        Stretch="Fill"
                                                        Stroke="#477EDE"
                                                        StrokeThickness="1"
                                                        UseLayoutRounding="True">
                                                        <Path.Data>
                                                            <RectangleGeometry
                                                                RadiusX="4"
                                                                RadiusY="4"
                                                                Rect="0,0,8,16" />
                                                        </Path.Data>
                                                    </Path>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="UIElement.IsMouseOver" Value="True">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                    <Trigger Property="Thumb.IsDragging" Value="True">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                    <Trigger Property="UIElement.IsEnabled" Value="False">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="0,5,2,5" />
                                </Trigger>
                                <Trigger Property="Slider.TickPlacement" Value="Both">
                                    <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
                                    <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
                                </Trigger>
                                <Trigger Property="Slider.IsSelectionRangeEnabled" Value="True">
                                    <Setter TargetName="PART_SelectionRange" Property="UIElement.Visibility" Value="Visible" />
                                </Trigger>
                                <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
                                    <Setter TargetName="Thumb" Property="TextElement.Foreground" Value="#0000FF" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
        <Setter Property="Panel.Background" Value="#00FFFFFF" />
        <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
        <Setter Property="TextElement.Foreground" Value="#E5E5E5" />
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Slider}">
                    <Border
                        Name="border"
                        Background="{TemplateBinding Panel.Background}"
                        BorderBrush="{TemplateBinding Border.BorderBrush}"
                        BorderThickness="{TemplateBinding Border.BorderThickness}"
                        SnapsToDevicePixels="True">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" MinHeight="{TemplateBinding FrameworkElement.MinHeight}" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <TickBar
                                Name="TopTick"
                                Grid.Row="0"
                                Height="4"
                                Margin="0,2,0,0"
                                Fill="{TemplateBinding TextElement.Foreground}"
                                Placement="Top"
                                Visibility="Collapsed" />
                            <TickBar
                                Name="BottomTick"
                                Grid.Row="2"
                                Height="4"
                                Margin="0,0,0,2"
                                Fill="{TemplateBinding TextElement.Foreground}"
                                Placement="Bottom"
                                Visibility="Collapsed" />
                            <Border
                                Name="TrackBackground"
                                Grid.Row="1"
                                Height="4"
                                Margin="5,0"
                                VerticalAlignment="Center"
                                Background="#FFE2E3E6"
                                BorderBrush="#D6D6D6"
                                BorderThickness="0">
                                <Canvas Margin="-6,-1">
                                    <Rectangle
                                        Name="PART_SelectionRange"
                                        Height="4"
                                        Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
                                        Visibility="Hidden" />
                                </Canvas>
                            </Border>
                            <Track Name="PART_Track" Grid.Row="1">
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton>
                                        <RepeatButton.Command>
                                            <RoutedCommand />
                                        </RepeatButton.Command>
                                        <RepeatButton.Style>
                                            <Style TargetType="{x:Type RepeatButton}">
                                                <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
                                                <Setter Property="Panel.Background" Value="#00FFFFFF" />
                                                <Setter Property="UIElement.Focusable" Value="False" />
                                                <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
                                                <Setter Property="Control.Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                            <Rectangle
                                                                Width="{TemplateBinding FrameworkElement.Width}"
                                                                Height="{TemplateBinding FrameworkElement.Height}"
                                                                Fill="{TemplateBinding Panel.Background}" />
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </RepeatButton.Style>
                                    </RepeatButton>
                                </Track.DecreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb
                                        Name="Thumb"
                                        Width="8"
                                        Height="16"
                                        VerticalAlignment="Center"
                                        Focusable="False"
                                        OverridesDefaultStyle="True">
                                        <Thumb.Template>
                                            <ControlTemplate TargetType="{x:Type Thumb}">
                                                <Grid
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Center"
                                                    UseLayoutRounding="True">
                                                    <Path
                                                        Name="grip"
                                                        VerticalAlignment="Center"
                                                        Fill="#477EDE"
                                                        SnapsToDevicePixels="True"
                                                        Stretch="Fill"
                                                        Stroke="#477EDE"
                                                        StrokeThickness="1"
                                                        UseLayoutRounding="True">
                                                        <Path.Data>
                                                            <RectangleGeometry
                                                                RadiusX="4"
                                                                RadiusY="4"
                                                                Rect="0,0,8,16" />
                                                        </Path.Data>
                                                    </Path>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="UIElement.IsMouseOver" Value="True">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                    <Trigger Property="Thumb.IsDragging" Value="True">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                    <Trigger Property="UIElement.IsEnabled" Value="False">
                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Thumb.Template>
                                    </Thumb>
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton>
                                        <RepeatButton.Command>
                                            <RoutedCommand />
                                        </RepeatButton.Command>
                                        <RepeatButton.Style>
                                            <Style TargetType="{x:Type RepeatButton}">
                                                <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
                                                <Setter Property="Panel.Background" Value="#00FFFFFF" />
                                                <Setter Property="UIElement.Focusable" Value="False" />
                                                <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
                                                <Setter Property="Control.Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                            <Rectangle
                                                                Width="{TemplateBinding FrameworkElement.Width}"
                                                                Height="{TemplateBinding FrameworkElement.Height}"
                                                                Fill="{TemplateBinding Panel.Background}" />
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </RepeatButton.Style>
                                    </RepeatButton>
                                </Track.IncreaseRepeatButton>
                            </Track>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Slider.TickPlacement" Value="TopLeft">
                            <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
                            <Setter TargetName="Thumb" Property="Control.Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type Thumb}">
                                        <Grid
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            UseLayoutRounding="True">
                                            <Path
                                                Name="grip"
                                                VerticalAlignment="Center"
                                                Fill="#477EDE"
                                                SnapsToDevicePixels="True"
                                                Stretch="Fill"
                                                Stroke="#477EDE"
                                                StrokeThickness="1"
                                                UseLayoutRounding="True">
                                                <Path.Data>
                                                    <RectangleGeometry
                                                        RadiusX="4"
                                                        RadiusY="4"
                                                        Rect="0,0,8,16" />
                                                </Path.Data>
                                            </Path>
                                        </Grid>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="UIElement.IsMouseOver" Value="True">
                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                            </Trigger>
                                            <Trigger Property="Thumb.IsDragging" Value="True">
                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                            </Trigger>
                                            <Trigger Property="UIElement.IsEnabled" Value="False">
                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="5,2,5,0" />
                        </Trigger>
                        <Trigger Property="Slider.TickPlacement" Value="BottomRight">
                            <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
                            <Setter TargetName="Thumb" Property="Control.Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type Thumb}">
                                        <Grid
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            UseLayoutRounding="True">
                                            <Path
                                                Name="grip"
                                                VerticalAlignment="Center"
                                                Fill="#477EDE"
                                                SnapsToDevicePixels="True"
                                                Stretch="Fill"
                                                Stroke="#477EDE"
                                                StrokeThickness="1"
                                                UseLayoutRounding="True">
                                                <Path.Data>
                                                    <RectangleGeometry
                                                        RadiusX="4"
                                                        RadiusY="4"
                                                        Rect="0,0,8,16" />
                                                </Path.Data>
                                            </Path>
                                        </Grid>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="UIElement.IsMouseOver" Value="True">
                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                            </Trigger>
                                            <Trigger Property="Thumb.IsDragging" Value="True">
                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                            </Trigger>
                                            <Trigger Property="UIElement.IsEnabled" Value="False">
                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="5,0,5,2" />
                        </Trigger>
                        <Trigger Property="Slider.TickPlacement" Value="Both">
                            <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
                            <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="Slider.IsSelectionRangeEnabled" Value="True">
                            <Setter TargetName="PART_SelectionRange" Property="UIElement.Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
                            <Setter TargetName="Thumb" Property="TextElement.Foreground" Value="#0000FF" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="SelectionStart" Value="{Binding Minimum, RelativeSource={RelativeSource Self}}" />
        <Setter Property="SelectionEnd" Value="{Binding Value, RelativeSource={RelativeSource Self}}" />
    </Style>
</ResourceDictionary>
