ToolTip 与 Popup(WPF 控件) [英] ToolTip versus Popup (WPF control)

查看:18
本文介绍了ToolTip 与 Popup(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.

这篇关于ToolTip 与 Popup(WPF 控件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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