0

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?

mm8
  • 163,881
  • 10
  • 57
  • 88
Admiral Land
  • 2,304
  • 7
  • 43
  • 81
  • 1
    The binding probably doesn't work. And why are you setting the Mode to TwoWay? Makes no sense. What's the DataContext of the control? – mm8 Oct 16 '17 at 11:13
  • @mm8, binding works for all controls (like TextBox), except DevEpress controls. I set programmatically: ratedPowerUpDown.DataContext = DataContext; but no effect – Admiral Land Oct 16 '17 at 11:23
  • 1
    DevExpress Controls? If you set the Tooltip to a hard-coded value it should work: ToolTip="...". Then you know that the binding fails. – mm8 Oct 16 '17 at 11:26

1 Answers1

1

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.

mm8
  • 163,881
  • 10
  • 57
  • 88