本文介绍了如何编程方式显示一个WPF / C#Windows.Control.ToolTip?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
似乎没有成为一个.Show()种方法为Windows.Control.ToolTip,包括在ToolTipService。任何想法?
There doesn't seem to be a .Show() kind of method for the Windows.Control.ToolTip, incl in ToolTipService. Any ideas?
谢谢!您的帮助。 : - )
Thanks! For your help. :-)
推荐答案您需要做的就是确保在控制工具提示的类型为工具提示。然后你就可以将IsOpen属性设置为true,像这样:
What you need to do is make sure the ToolTip on the control is of type ToolTip. Then you can set the IsOpen property to true like so:
ToolTip tooltip = new ToolTip{ Content = "My Tooltip" }; NameTextBox.ToolTip = tooltip; tooltip.IsOpen = true;更多推荐
如何编程方式显示一个WPF / C#Windows.Control.ToolTip?
发布评论