PopupPositionerConstraintAdjustment Enum
Definition
Defines how a popup position will be adjusted if the unadjusted position would result in the popup being partly constrained.
public 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
| Name | Description |
|---|---|
| All | No summary available. |
| FlipX | Invert the anchor and gravity on the x axis if the surface is constrained on the x axis. |
| FlipY | Invert the anchor and gravity on the y axis if the surface is constrained on the y axis. |
| None | Don't alter the surface position even if it is constrained on some axis, for example partially outside the edge of an output. |
| ResizeX | Horizontally resize the surface |
| ResizeY | Vertically resize the surface |
| SlideX | Slide the surface along the x axis until it is no longer constrained. |
| SlideY | Slide 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.