工具提示与弹出窗口(WPF控件) [英] ToolTip versus Popup (WPF control)
问题描述
这些WPF控件之间的主要区别是什么?
而当我应该使用ToolTip
而不是Popup
时?
What are the main differences between these WPF controls?
And when I should use a ToolTip
instead of Popup
?
推荐答案
ToolTip
是一个小的弹出窗口,当用户将鼠标指针悬停在某个元素上时出现. Popup
控件提供了一种在单独的窗口中显示内容的方法,该窗口相对于指定的元素或屏幕坐标浮动在当前应用程序窗口上.
A ToolTip
is a small pop-up window that appears when a user pauses the mouse pointer over an element; the Popup
control provides a way to display content in a separate window that floats over the current application window relative to a designated element or screen coordinate.
当鼠标指针移到其父对象上时,Popup
不会自动打开.如果要自动打开Popup
,请使用ToolTip
或ToolTipService
类.
A Popup
does not automatically open when the mouse pointer moves over its parent object. If you want a Popup
to automatically open, use the ToolTip
or ToolTipService
class.
For more information see: ToolTip overview and Popup overview.
这篇关于工具提示与弹出窗口(WPF控件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!