This project has moved and is read-only. For the latest updates, please go here.

IntegerUpDown Minimum and Maximum in Tooltip

Apr 26, 2016 at 11:22 AM
I want to show user minimum and maximum value in Tooltip, but it does't work (Tooltip is empty).
I try to bind by ElementName, with FindAncestor - nothing.
If I set binding from external TextBlock - it works.

How I can achieve that?
Apr 26, 2016 at 9:30 PM

You can use this :
 <xctk:IntegerUpDown Margin="5"
                        ToolTip="{Binding Maximum, RelativeSource={RelativeSource Self}}" />
And maybe add a Converter to support a binding on Minimum and Maximum values.
Apr 27, 2016 at 8:30 AM
Thank You, this works, but I want to add Minimum and Maximum values to ToolTip. I try to do like this:
<toolkit:IntegerUpDown x:Name="integerUpDown">
           <TextBlock Text="{Binding ElementName=integerUpDown, Path=Minimum, StringFormat=Min: {0}}" />
           <TextBlock Text="{Binding ElementName=integerUpDown, Path=Maximum, StringFormat=Max: {0}}" />
Tooltip Shows, but empty. Also I try instead ElementName to do with FindAncestor - without positive.

Any Ideas?
Apr 27, 2016 at 1:29 PM
Try this :
 <xctk:IntegerUpDown x:Name="integerUpDown"
        <ToolTip DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
            <TextBlock Text="{Binding Minimum, StringFormat=Min: {0}}" />
            <TextBlock Text="{Binding Maximum, StringFormat=Max: {0}}" />
Apr 27, 2016 at 3:28 PM
This works, thank You! (but it's quite weird;) )