Represents a service that provides properties and events to control the display and behavior of tooltips.
Assembly: PresentationFramework (in PresentationFramework.dll)
Gets or sets the maximum time between the display of two tooltips where the second tooltip appears without a delay.
Gets or sets whether the tooltip displays a drop shadow effect.
Gets or sets the length of time before a tooltip opens.
Gets or sets whether a tooltip appears.
Gets whether a tooltip is currently visible.
Gets or sets the orientation of the tooltip when it opens, and specifies how the tooltip behaves when it overlaps screen boundaries.
Gets or sets the rectangular area relative to which the tooltip is positioned.
Gets or sets the object relative to which the tooltip is positioned.
Gets or sets the amount of time that a tooltip remains visible.
Gets or sets whether a tooltip appears for an object that is not enabled.
Gets or sets the content of a tooltip.
Identifies the ToolTipClosing event that is exposed by objects that use the service to display tooltips.
Identifies the ToolTipOpening event that is exposed by objects that use the service to display tooltips.
You define a tooltip for an element by setting the FrameworkContentElement.ToolTip or FrameworkElement.ToolTip property. The ToolTip property takes one child. The content of the child can vary from a simple text string to more complex content such as a StackPanel that has embedded text and Image elements.
You can define tooltip content as a ToolTip object, but this is not required. When you do not define the tooltip content as a ToolTip object, you can use the properties to position and customize the tooltip content. The class attached properties are used to determine the placement, behavior, and appearance of a tooltip. These properties are set on the element that defines the tooltip.
The ToolTip class and the class share many of the same properties that are used to customize a tooltip. If equivalent ToolTip and properties are both set, the property takes precedence. For example, if both the ToolTip.Placement property and the ToolTipService.Placement property are set for a System.Windows.Controls.ToolTip object, the value of the ToolTipService.Placement property is used.
The followingtiming properties are only defined for the class and are used by all tooltips:
Placement, PlacementRectangle, PlacementTarget, HorizontalOffset, and VerticalOffset behave similarly to the properties of the same name in the Popup class. For more information, see Popup Placement Behavior.
Legacy Code Example
The following example shows how the use theclass to specify the behavior of a tooltip. You set the properties of the class by attaching them directly to the element that exposes the tooltip.Code snippet is not found. Confirm that the code snippet name 'ToolTipService' is correct.Code snippet is not found. Confirm that the code snippet name 'HOWDOI' is correct.Code snippet is not found. Confirm that the code snippet name 'HOWDOI' is correct.
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.