Reputation: 61
I'm making Windows 8.1 phone app using Visual Studio 2015 and C# XAML.
I want to change the slider's thumb to a "round" style, like below. Can is be easily changed or not?
Please help me change the slider's style.
Upvotes: 1
Views: 376
Reputation: 981
Try the following style for the slider thumb:
XAML:
<Style x:Key="SliderThumbStyle"
TargetType="Thumb">
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="BorderBrush"
Value="{ThemeResource SliderThumbBorderThemeBrush}" />
<Setter Property="Background"
Value="{ThemeResource SliderThumbBackgroundThemeBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Upvotes: 1