I have a property in my view model that provides the tooltip that I want to show in the slider thumb, but I can't seem to get it to work. It only seems to work if I set it to a static text item. I've been able to use the same method to add a tooltip to other controls (like a button), but the same doesn't seem to work for the thumb. Below is part of the xaml from a sample project I created to verify it wasn't something else in the more complex one.
<Button Grid.Row="0" Content="Fubar" ToolTip="{Binding Tooltip}" /> <ig:XamNumericRangeSlider Grid.Row="1" Name="xamNumericRangeSlider1" VerticalAlignment="Top" Height="165" Margin="58,31,253,0" MinValue="{Binding SliderMinimum, Mode=OneWay}" MaxValue="{Binding SliderMaximum, Mode=OneWay}" Orientation="Vertical" > <ig:XamSliderNumericThumb x:Name="thumb" Value="{Binding SliderValue, Mode=TwoWay}" TrackFillBrush="Transparent" ToolTip="{Binding Tooltip}" /> ig:XamNumericRangeSlider>
In the code-behind, I'm setting the DataContext of the containing user control to a view model with the properties I'm binding to. All other binding works, just not the ToolTip of the thumb. I've also tried directly setting the datacontext of the slider and the thumb as well (thinking maybe it just couldn't find it), but that also didn't work. Is there something else that I'm missing that the thumb needs differently than the button?
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Not quite sure why that would be needed in the thumb, when the thumb tooltip works just fine with static text, and you don't need to modify the style like that on the Button (or any other controls I tried it on), but that is a workable workaround as I'm already overriding the style in the full app anyway.
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I copied the default Style for the XamSliderNumericThumb and removed a ToolTip that was set to one of its elements, because it was overriding the one you set to directly to the Thumb. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.