WPF工具提示能见度 [英] WPF Tooltip Visibility

查看:128
本文介绍了WPF工具提示能见度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能保证当按钮被禁用按钮的工具提示才可见?

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?

推荐答案

您需要设置<一个href=\"http://msdn.microsoft.com/en-us/library/system.windows.controls.tooltipservice.showondisabled.aspx\">ToolTipService.ShowOnDisabled为True的按钮,以便当按钮被禁用有工具提示可见。您可以绑定<一个href=\"http://msdn.microsoft.com/en-us/library/system.windows.controls.tooltipservice.isenabled.aspx\">ToolTipService.IsEnabled上的按钮启用和禁用的工具提示。

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.

这篇关于WPF工具提示能见度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆