Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slider with multiple intervals

Tags:

wpf

slider

Currently, the WPF slider has some properties that allow defining and viewing a single interval on a slider: SelectionStart, SelectionEnd and IsSelectionRangeEnabled.

By setting these values

<Slider Minimum="0" Maximum="300" Value="150" IsSelectionRangeEnabled="True" SelectionStart="50" SelectionEnd="200"/>

you get the selected interval in the slider, colored in blue, like this:

enter image description here

What I would like to do is to be able to define multiple intervals - e.g. (50-100), (110-130), (170-200) and (210-240), which would look like this:

enter image description here

Any ideas on how to aproach this issue or what template I should try modifying in order to get this feature?

like image 223
melculetz Avatar asked Apr 10 '12 10:04

melculetz


1 Answers

this may not be an answer but a workaround. I place slider bar on canvas, then draw to canvas Highlight segments on slider bar

like image 122
Steven Du Avatar answered Oct 23 '22 16:10

Steven Du