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

Slider - AutoToolTip behavior

6 Answers 317 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 05 Oct 2012, 10:16 PM
I'm trying to use the RadSlider control with a tooltip to indicate the value as the thumb is dragged. This behavior can be seen with a base WPF Slider control when specifying the AutoToolTipPlacement property.

My RadSlider uses the 'IsDeferredDraggingEnabled="True"' but I still want the tooltip to display the value where the thumb is currently if the user has the mouse pressed, and have the binding source update when the user is done dragging. Also, I need control over formatting the tooltip based on the value. An example of what I am doing currently is shown below.

<telerik:RadSlider Padding="2" Width="154"
                        Minimum="{Binding MinSpeedValue}" Value="{Binding SpeedValue}" Maximum="{Binding MaxSpeedValue}"
                        LargeChange="1" SmallChange="1" IsMoveToPointEnabled="True" TickFrequency="1" IsSnapToTickEnabled="True"
                        ToolTip="{StaticResource SpeedTooltip}"
                        IsDeferredDraggingEnabled="True"/>

Any help would be appreciated.

6 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 10 Oct 2012, 03:41 PM
Hi Justin,

Unfortunately the RadSlider doesn't support tooltips out-of-the-box. And even though you can implement a custom tooltip, you won't be able to update its Content when the RadSlider IsDeferredDraggingEnabled property is set to True.

However, we've added this as a feature request in our PITS and you can vote for it in order to increase its priority.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Haris
Top achievements
Rank 1
answered on 25 Apr 2014, 06:06 AM
Aren't the telerik controls meant to improve the standard MS controls? 

Is this functionality still not available? 
0
Pavel R. Pavlov
Telerik team
answered on 29 Apr 2014, 05:52 AM
Hello Haris,

Actually our controls are designed to extend (by providing new functionality or improving existing one) the suite of controls that Microsoft provide out of the box. Most of our controls derive from base classes like ContentControl, ItemsControl, HeaderedItemsControl and others.

Regarding your second query, this functionality is logged as a feature request in our system. Also, it is already approved and we will consider its implementation in our future releases. Please follow the item and stay tuned for any changes.

Thank you for understanding.

Regards,
Pavel R. Pavlov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Douwe
Top achievements
Rank 1
answered on 25 May 2016, 10:04 AM
Any news on this? I am breaking my head on how to display a tooltip with a custom text while dragging the thumb on the RadSlider but I did not yet find a solution...
0
Kiril Vandov
Telerik team
answered on 25 May 2016, 11:20 AM
Hello Douwe,

The feature that you are asking for is still not implemented due to more urgent tasks and as it has an easy custom solution. You can create a Popup in which you can display the slider value and control its text and location using the slider event. I will guide you trough the basic steps:
- we need to wait for the loader event of the slider and get the Thumb element called ("SingleThumbHost") from the template of the RadSlider control.
- we create a new Popup and assign its PlacementTarget to be the "SingleThumbHost" thumb.
- subscribe to the DragCompleted event of the "SingleThumbHost" thumb to close the popup once the drag is finished.
- subscribe to the DragStarted event of the "SingleThumbHost" thumb to open the popup once the drag is started.
- subscribe to the ValueChanged event of the RadSlider to update the Popup placement and Value.

I have attached a sample project demonstrating the above approach. I have also created a Border which wraps the TextBlock which displays the slider value in order to be displayed exactly like the Microsoft Slider control.

I hope this information helps.


Regards,
Kiril Vandov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Douwe
Top achievements
Rank 1
answered on 25 May 2016, 07:48 PM

Dear Kiril,

That was exactly what I needed, thank you very much for your swift and helpful response!

Kind regards,

Douwe

Tags
Slider
Asked by
Justin
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Haris
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Douwe
Top achievements
Rank 1
Kiril Vandov
Telerik team
Share this question
or