工具提示与弹出窗口(WPF控件) [英] ToolTip versus Popup (WPF control)

查看:520
本文介绍了工具提示与弹出窗口(WPF控件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些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,请使用ToolTipToolTipService类.

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屋!

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