WPF Binding to Tooltip

前端 未结 4 1339
误落风尘
误落风尘 2021-02-13 01:37

Not sure whats doing here, but the binding works for the label in the data template but not the tool tip. Any help will be appreciated.

                    

        
4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 02:01

    Tooltip should not need a relativesource binding. Try this with no data context binding

    
        
    
    

    This is assuming that the Label type that this DataTemplate is based on has a property called Description. One of the few instances where you may need to bind to the PlacementTarget is in some cases with a ContextMenu control.

提交回复
热议问题