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

Different Tooltips on range selector

2 Answers 89 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Yoann
Top achievements
Rank 1
Yoann asked on 17 Jul 2015, 01:47 PM

Is it possible to have 1 tooltip for the SelectionStart 'gripper' of the slider, and an other tooltip for the SelectionEnd 'gripper'?

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 21 Jul 2015, 08:42 AM
Hello Yoann,

In order to achieve this you can use the ThumbStyle and AlternateThumbStyle properties of the RadSlider control. The properties accept a Style that targets a native Thumb element. However, by setting those styles you will override the default ones. So you can extract the default styles and use them as a base for the new one. Here is an example:
<Style TargetType="Thumb" x:Key="ThumbStyle">           
    <!-- default setters -->
</Style>
<Style x:Key="leftThumbStyle" TargetType="Thumb" BasedOn="{StaticResource ThumbStyle}">
    <Setter Property="telerik:RadToolTipService.ToolTipContent" Value="Thumb 1" />
</Style>
<Style x:Key="rightThumbStyle" TargetType="Thumb" BasedOn="{StaticResource ThumbStyle}">
    <Setter Property="telerik:RadToolTipService.ToolTipContent" Value="Thumb 2" />
</Style>
<!-- ............ -->
<telerik:RadSlider IsSelectionRangeEnabled="True" Minimum="0" Maximum="100"
                   ThumbStyle="{StaticResource leftThumbStyle}"
                   AlternateThumbStyle="{StaticResource rightThumbStyle}" />
I also attached a project demonstrating this approach. I hope it is useful.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Yoann
Top achievements
Rank 1
answered on 22 Jul 2015, 01:30 PM
Thank you this is what I was looking for (although I was hoping for a solution which didn't require extracting the complete thumb style...)
Tags
Slider
Asked by
Yoann
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Yoann
Top achievements
Rank 1
Share this question
or