Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
800
Bind tooltip on thumb
posted

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?