WPF Tooltip Visibility

前端 未结 4 1711
梦毁少年i
梦毁少年i 2020-12-06 16:17

How can I ensure that a button\'s Tooltip is only visible when the button is disabled?

What can I bind the tooltip\'s visibility to?

4条回答
  •  难免孤独
    2020-12-06 16:59

    You will need to set ToolTipService.ShowOnDisabled to True on the Button in order to have the Tooltip visible at all when the Button is disabled. You can bind ToolTipService.IsEnabled on the Button to enable and disable the Tooltip.

提交回复
热议问题