ToolTipService Class
Collapse the table of content
Expand the table of content

ToolTipService Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Represents a service that provides static methods to display a tooltip.


Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

Public NotInheritable Class ToolTipService

The ToolTipService type exposes the following members.

Public attached propertyPlacementGets or sets the position of the tooltip in relation to its target visual element.
Public attached propertyPlacementTargetGets or sets the visual element that the tooltip should be positioned in relation to.
Public attached propertyToolTipGets or sets a tooltip to be attached to a control.

Public methodStatic memberGetPlacementGets the relative position of the specified tooltip.
Public methodStatic memberGetPlacementTargetGets the visual element that the tooltip is positioned relative to.
Public methodStatic memberGetToolTipGets the tooltip for an object.
Public methodStatic memberSetPlacementSets the position of the specified ToolTip using the specified placement mode.
Public methodStatic memberSetPlacementTargetSets the position of the specified ToolTip relative to the specified value element.
Public methodStatic memberSetToolTipSets the tooltip for an object.

Public fieldStatic memberPlacementPropertyIdentifies the Placement dependency property.
Public fieldStatic memberPlacementTargetPropertyIdentifies the PlacementTarget dependency property.
Public fieldStatic memberToolTipPropertyIdentifies the ToolTip dependency property.

To display a tooltip for a control you must use the ToolTipService class. Use the static SetToolTip and GetToolTip methods to set and get the tooltip for a control.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

© 2018 Microsoft