How to snap to the values on a WPF slider, but only show a tick for some of them

Kamiikoneko picture Kamiikoneko · Jan 28, 2010 · Viewed 14.2k times · Source

I have a WPF slider whose minimum value = 0 and maximum value = 50. I want to show ticks at an interval of 5, but have the slider snap at an interval of 1. Is this even possible?

Answer

Heiner picture Heiner · Jan 4, 2011

The property Interval does not affect this behaviour.

Use this:

<Slider TickFrequency="5" IsSnapToTickEnabled="True" />