Skip to main content

PopupPositionerConstraintAdjustment Enum

Definition

Assembly:Avalonia.Controls
Package:Avalonia

Defines how a popup position will be adjusted if the unadjusted position would result in the popup being partly constrained.

public enum PopupPositionerConstraintAdjustment

Inheritance: Enum -> PopupPositionerConstraintAdjustment

Remarks

Whether a popup is considered 'constrained' is left to the positioner to determine. For example, the popup may be partly outside the target platform defined 'work area', thus necessitating the popup's position be adjusted until it is entirely inside the work area.

Fields

NameDescription
AllNo summary available.
FlipXInvert the anchor and gravity on the x axis if the surface is constrained on the x axis.
FlipYInvert the anchor and gravity on the y axis if the surface is constrained on the y axis.
NoneDon't alter the surface position even if it is constrained on some axis, for example partially outside the edge of an output.
ResizeXHorizontally resize the surface
ResizeYVertically resize the surface
SlideXSlide the surface along the x axis until it is no longer constrained.
SlideYSlide the surface along the y axis until it is no longer constrained.

All Field

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment All

FlipX Field

Invert the anchor and gravity on the x axis if the surface is constrained on the x axis.

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment FlipX

Remarks

For example, if the left edge of the surface is constrained, the gravity is 'left' and the anchor is 'left', change the gravity to 'right' and the anchor to 'right'.

If the adjusted position also ends up being constrained, the resulting position of the FlipX adjustment will be the one before the adjustment.

FlipY Field

Invert the anchor and gravity on the y axis if the surface is constrained on the y axis.

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment FlipY

Remarks

For example, if the bottom edge of the surface is constrained, the gravity is 'bottom' and the anchor is 'bottom', change the gravity to 'top' and the anchor to 'top'.

The adjusted position is calculated given the original anchor rectangle and offset, but with the new flipped anchor and gravity values.

If the adjusted position also ends up being constrained, the resulting position of the FlipY adjustment will be the one before the adjustment.

None Field

Don't alter the surface position even if it is constrained on some axis, for example partially outside the edge of an output.

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment None

ResizeX Field

Horizontally resize the surface

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment ResizeX

Remarks

Resize the surface horizontally so that it is completely unconstrained.

ResizeY Field

Vertically resize the surface

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment ResizeY

Remarks

Resize the surface vertically so that it is completely unconstrained.

SlideX Field

Slide the surface along the x axis until it is no longer constrained.

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment SlideX

Remarks

First try to slide towards the direction of the gravity on the x axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.

Then try to slide towards the opposite direction of the gravity on the x axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.

SlideY Field

Slide the surface along the y axis until it is no longer constrained.

public Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment SlideY

Remarks

First try to slide towards the direction of the gravity on the y axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.

Then try to slide towards the opposite direction of the gravity on the y axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.