This is a migrated thread and some comments may be shown as answers.

How to Implement a Custom Slide Control?

3 Answers 274 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
bill
Top achievements
Rank 1
bill asked on 13 Feb 2014, 04:34 PM
Hello,

  I have a requirement for a custom control but not exactly sure which control to use or if it is possible. The sceanrio is simple enough with an explanation outlined below. Any ideas will be greatly appreciated!

REQS

control will be used to visualize the start and stop of a sales cycle

- the control will be embedded in a grid row as a column template
- the control needs to look and behave like a slider control
- the control needs to have two thumbs
- first thumb marks the start of a sales period
- the second thumb marks the end of a sales period
- ticks must be in date format
- the second thumb must enable the user to adjust it along the slider to any position but NOT before the first slider

- i looked at the RAD WPF Slider but the ticks dont appear to be able to render in date format nor did i see a way to add multiple thumbs beyond a range
- i looked at the time bar control but that would most likely be too large and overkill for a templated column
- i looked at the RAD time line control but that doesnt appear to be adjustable

Thank You,
Bill Spaulding

3 Answers, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 18 Feb 2014, 01:46 PM
Hello Bill Spaulding,

The RadSlider support SelectionRange as you described in your requirements, it can be enabled by setting the IsSelectionRangeEnabled property to "True", for more information you can check this article. The ticks of the RadSlider also can be customized using the TickTemplate property and through converter to make the tick value to be displayed as a Date.

I have attached a sample project demonstrating the above approach for your convenience.

Also I am not sure what you mean by "a way to add multiple thumbs beyond a range". Do you expect to have more than two thumbs? If you can provide us with a picture showing how you expect the control to look like, will help us better understand your scenario.

Kind regards,
Kiril Vandov
Telerik
0
bill
Top achievements
Rank 1
answered on 18 Feb 2014, 02:32 PM
Kiril,

 Thank you very much for your time and the sample application. This might work for me. I need to drop it in a templated grid column and do some testing. To clarify the multiple thumb req.... Other control sets that we have seen have allowed a range slider to add as many thumbs as desired. each thumb has a behavior property that says its locked in place, or that it allows other thumbs to slide past it or it allows other thumbs to push it forward.

The targeted outcome of such a feature would be to leverage the additional thumbs as events on a timeline. The thumbs would each display a particular event at a particular point in time. The user would be able to adjust each thumb which in turn would adjust the date of the event.

Question: is there a way to inject a custom tooltip message into each thumb? And are there any limits to the styles that can be applied to each thumb? (would like to make them large triangles but so far my efforts result in the triangles being rendered as markers but much of the shape is cut off)

Thank You,
Bill Spaulding
0
Accepted
Kiril Vandov
Telerik team
answered on 20 Feb 2014, 01:52 PM
Hello Bill,

You can change the default styles of the RadSlider using the ThumbStyle property for changing the RangeStartThumb and the AlternateThumbStyle property for the RangeEndThumb. There are no known limitation for these style properties, also you can inject the custom ToolTips using these styles.

I have attached a modified version of the project that I send you earlier and applied the changes you described(triangles for thumbs and a custom tooltips) for your convenience.

As for the multiple thumbs support(more than two), currently the RadSlider does not support that feature. However we have an a feature request for such implementation and you can vote and track its progress in our feedback portal.

Kind regards,
Kiril Vandov
Telerik
Tags
General Discussions
Asked by
bill
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
bill
Top achievements
Rank 1
Share this question
or