Partilhar via


ToolTip.PlacementTarget Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the visual element or control that the tool tip should be positioned in relation to when opened by the ToolTipService.

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

Syntax

'Declaration
Public Property PlacementTarget As UIElement
public UIElement PlacementTarget { get; set; }
<ToolTip PlacementTarget="{Binding ElementName=placementTargetName}"/>

XAML Values

  • placementTargetName
    The Name or x:Name of the UI element that serves as the placement target. This syntax assumes that the working data context contains the named element. For more information, see ElementName.

Property Value

Type: System.Windows.UIElement
The visual element or control that the tool tip should be positioned in relation to when opened by the ToolTipService. The default is nulla null reference (Nothing in Visual Basic).

Remarks

The PlacementTarget and Placement properties are used together to determine which side of a visual element to place the ToolTip.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.