ToolTip.PlacementRect Property

Definition

Gets or sets the rectangular area that the tooltip should be positioned in relation to when opened by the ToolTipService. If space allows, the open tooltip will not occlude the area defined by its PlacementRect.

Equivalent WinUI property: Microsoft.UI.Xaml.Controls.ToolTip.PlacementRect.

public:
 property IReference<Rect> ^ PlacementRect { IReference<Rect> ^ get(); void set(IReference<Rect> ^ value); };
IReference<Rect> PlacementRect();

void PlacementRect(IReference<Rect> value);
public System.Nullable<Rect> PlacementRect { get; set; }
var iReference = toolTip.placementRect;
toolTip.placementRect = iReference;
Public Property PlacementRect As Nullable(Of Rect)

Property Value

IReference<Rect>

Nullable<Rect>

The rectangular area that the tooltip is positioned in relation to when opened by the ToolTipService. The default is null.

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

PlacementRect anchors the tooltip's position and also serves as an area that the opened tooltip will not occlude, provided there's sufficient space to draw tooltip outside this area. You can specify the origin of the rectangle relative to the tooltip's owner, and the height and width of the exclusion area. The Placement property will define if tooltip should draw above, below, left, or right of the PlacementRect.

Applies to

See also