Show WPF Tooltip if needed

前端 未结 3 665
粉色の甜心
粉色の甜心 2020-12-13 07:12

I have a TextBlock inside a limited-size control. If the text is too long to fit into the control, I\'d like to show a tooltip with full text. This is a classic behavior you

3条回答
  •  借酒劲吻你
    2020-12-13 07:43

    I would think you have to look at a ControlTemplate trigger to solve this problem. Unfortunately ControlTemplate triggers always compare with a specific value, not less than or greater than. You can make it appear e.g. if the Width = 100, not Width < 100.

提交回复
热议问题