How to show tooltip for IntegerUpdown control?

133 Views Asked by At

I try to make tooltip on DevExpress IntegerUpDown (DoubleUpDown and so on) control:

  <xcd:DoubleUpDown
                          HorizontalAlignment="Stretch"
                          Margin="5,2" 
                          Grid.Column="0"
                          Minimum="0"                                                            
                          Value="{Binding SomeValue,Mode=TwoWay,UpdateSourceTrigger=LostFocus}"
                          Text="{Binding SomeValue,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" 
                          ToolTip="{Binding SomeValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  
                            >                         
                        </xcd:DoubleUpDown>

But, it do not work for me - only empty tooltip shows. How to make tooltip?

1

There are 1 best solutions below

0
On

If you see an empty ToolTip at runtime, it is your binding that fails.

Try to set the ToolTip property to a hard-coded value and you should see that it works:

ToolTip="Test"

You then know that there is something wrong with your binding. Make sure that the DoubleUpDown control has a DataContext that has a public SomeValue property that returns the value you are expecting to show up in the tooltip.

Also note that it makes no sense to set the Mode property to TwoWay and the UpdateSourceTrigger property to PropertyChanged on a ToolTip binding.