I want to make slider to select dates. For example, every hour in last two days. Also slider should has a legend on the bottom with values. How could I do it?
I made slider with data context as DoubleCollection from total hours in date and changed tooltip using custom ValueConverter. But when I change value, tooltip shows real values – total hours in date. Also I have no idea how to add a legend.
Here is a working example. First we create a slider from 0 to 48 rounded to integer values (
TickFrequency="1" IsSnapToTickEnabled="True") then add aTextBlockbound to the slider value.A
ValueConverteris used to convert the 0-48 value into a date.And the code behind: