ToolTipService.PlacementTarget attached property

Gets or sets the object relative to which a tooltip is positioned.

<object ToolTipService.PlacementTarget="{Binding ElementName=referenceToTarget}"/>

XAML Values


The Name or x:Name attribute of the UI element that serves as the placement target. This syntax assumes that the working data context contains the named element, and that there are no visual tree disconnects such as attempting to reference a UserControl or a template part.


If there is no explicit PlacementTarget, the placement target for a ToolTip is the element that specifies a value for its TooltipService.ToolTip attached property value. Any Placement value (either as an attached property or as an attribute on an explicit ToolTip element) applies to that target.

TooltipService.Placement and TooltipService.PlacementTarget are usually left as the defaults. The scenario for specifying either or both of these properties is if you are trying to avoid a case where the tooltip obscures the content it is referring to while the tooltip is displayed, or you want to focus attention on only the active elements in a UI. For example, if there is an icon Image and an adjacent control TextBox in your UI composition, it might be appropriate to target the TextBox as the placement target for the tooltip when the user places the pointer over the Image.

TooltipService.PlacementTarget is an attached property, which supports a XAML usage. When setting this property in code, use SetPlacementTarget instead. When getting this property in code, use GetPlacementTarget instead. In code usages, the target parameter is the object where the attached property value is set. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing PlacementTargetProperty as the dependency property identifier.

Requirements (Windows 10 device family)

Device family

API contract




Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]





See also

Attached properties overview