Share via


PopupPlacementMode Enum

Definition

Defines constants that specify the preferred ___location for positioning a popup relative to a visual element.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.Primitives.PopupPlacementMode (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public enum class PopupPlacementMode
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 917504)]
enum class PopupPlacementMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 917504)]
public enum PopupPlacementMode
Public Enum PopupPlacementMode
Inheritance
PopupPlacementMode
Attributes

Windows requirements

Device family
Windows 11 (introduced in 10.0.22000.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v14.0)

Fields

Name Value Description
Auto 0

Preferred ___location is determined automatically.

Top 1

Preferred ___location is above the target element.

Bottom 2

Preferred ___location is below the target element.

Left 3

Preferred ___location is to the left of the target element.

Right 4

Preferred ___location is to the right of the target element.

TopEdgeAlignedLeft 5

Preferred ___location is above the target element, with the left edge of popup aligned with left edge of the target element.

TopEdgeAlignedRight 6

Preferred ___location is above the target element, with the right edge of popup aligned with right edge of the target element.

BottomEdgeAlignedLeft 7

Preferred ___location is below the target element, with the left edge of popup aligned with left edge of the target element.

BottomEdgeAlignedRight 8

Preferred ___location is below the target element, with the right edge of popup aligned with right edge of the target element.

LeftEdgeAlignedTop 9

Preferred ___location is to the left of the target element, with the top edge of popup aligned with top edge of the target element.

LeftEdgeAlignedBottom 10

Preferred ___location is to the left of the target element, with the bottom edge of popup aligned with bottom edge of the target element.

RightEdgeAlignedTop 11

Preferred ___location is to the right of the target element, with the top edge of popup aligned with top edge of the target element.

RightEdgeAlignedBottom 12

Preferred ___location is to the right of the target element, with the bottom edge of popup aligned with bottom edge of the target element.

Applies to