ToolTipService.Placement attached property

Applies to Windows and Windows Phone

Gets or sets how a ToolTip is positioned in relation to the placement target.


<object ToolTipService.Placement="placementModeValue"/>

XAML Values

placementModeValue

A named constant of the PlacementMode enumeration, for example Top.

Remarks

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 is an attached property, which supports a XAML usage. When setting this property in code, use SetPlacement instead. When getting this property in code, use GetPlacement 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 PlacementProperty as the dependency property identifier.

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls

Metadata

Windows.winmd

See also

ToolTip
Attached properties overview

 

 

Show:
© 2014 Microsoft