Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.98 KB

tooltip_placementtarget.md

File metadata and controls

35 lines (25 loc) · 1.98 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.ToolTip.PlacementTarget
winrt property

Microsoft.UI.Xaml.Controls.ToolTip.PlacementTarget

-description

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

-xaml-syntax

<ToolTip PlacementTarget="{Binding ElementName=placementTargetName}"/>

-xaml-values

placementTargetName
placementTargetNameThe Name or x:Name attribute of the 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 The visual element or control that the tool tip is positioned in relation to when opened by the [ToolTipService](tooltipservice.md). The default is **null**.

-remarks

If there is no explicit PlacementTarget, the placement target for a ToolTip is the element that specifies the ToolTip as the value for its ToolTipService.Tooltip attached property value, and any Placement value applies to that target. The placement target determination is based on visual tree composition, and whether to display a tooltip at all is parallel to the target's hit test characteristics. A Control instance where IsEnabled is false will not display a ToolTip.

Placement and 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.

-examples

-see-also

Placement, PlacementMode