To make the Thumb to a circle , you can edit it's default Grid part of Template[Doucument outline >Edit Templete>Edit a copy... ] named SliderThumbHorizontalDefault to below code:
<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Bottom" Width="20" Height="20">
<Path x:Name="grip" Width="20" Height="20" Fill="Red" SnapsToDevicePixels="True" Stroke="Red" UseLayoutRounding="True" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<EllipseGeometry Center="10,10" RadiusX="10" RadiusY="10"></EllipseGeometry>
</Path.Data>
</Path>
</Grid>
Then set IsSelectionRangeEnabled="True" ValueChanged="MySilder_ValueChanged" for the Slider.The MySilder_ValueChanged code is:
private void MySilder_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
if(MySilder.Value>0)
{
MySilder.SelectionEnd = MySilder.Value;
MySilder.SelectionStart = 0;
}else
{
MySilder.SelectionEnd = 0;
MySilder.SelectionStart = MySilder.Value;
}
}
The result picture is like this:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.