Updated: February 2009
Represents a control that creates a pop-up window that displays information for an element in the interface.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
You use a control to provide information to the user. For example, you can use a to provide the name of a Button or a ToolBar in a ToolBarTray. The content of a control can vary from a simple text string to more complex content such as a StackPanel that has embedded text and images. The content of a cannot receive focus.
You can use a on multiple elements by defining a in a ResourceDictionary.
The properties of the class are used to define the position and behavior of the tooltip. Many of these properties are also defined in the ToolTipService class. If the value of one of these properties is specified by both the property and the ToolTipService attached property, the value of the ToolTipService property is used. In addition, the ToolTipService class provides properties to set timing behavior. These attached properties are not included in the class but can be used by the control.
Dependency properties for this control might be set by the control’s default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see Themes.
This example shows how to define a tooltip control for a TextBox element.
The following example shows how to define a tooltip by assigning text to the ToolTip property.
The following example shows how to define a tooltip by assigning a object to the ToolTip property.
The following example uses code to generate a object. The example creates a (tt) and associates it with a Button.
|How to: Position a ToolTip||This example shows how to specify the position of a tooltip on the screen.|
|How to: Delay the Display of a ToolTip||This example shows how to set a ToolTipService property that causes a brief delay before a displays. You set the properties of the ToolTipService class by attaching them directly to the element that exposes the tooltip.|
|How to: Use the BetweenShowDelay Property||This example shows how to use the BetweenShowDelay time property so that tooltips appear quickly—with little or no delay—when a user moves the mouse pointer from one tooltip directly to another.|
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.