Struct PortalPositionRequest
- Namespace
- SharpConsoleUI.Layout
- Assembly
- SharpConsoleUI.dll
Describes a portal positioning request.
public readonly record struct PortalPositionRequest : IEquatable<PortalPositionRequest>
- Implements
- Inherited Members
- Extension Methods
Constructors
PortalPositionRequest(Rectangle, Size, Rectangle, PortalPlacement, int)
Describes a portal positioning request.
public PortalPositionRequest(Rectangle Anchor, Size ContentSize, Rectangle ScreenBounds, PortalPlacement Placement, int AlignmentOffset = 0)
Parameters
AnchorRectangleThe anchor rectangle (e.g. header bounds of dropdown, or menu item bounds).
ContentSizeSizeThe desired size of the portal content.
ScreenBoundsRectangleThe available screen/window area to position within.
PlacementPortalPlacementPreferred placement direction.
AlignmentOffsetintOptional horizontal/vertical offset for alignment (e.g. centering dropdown under header).
Properties
AlignmentOffset
Optional horizontal/vertical offset for alignment (e.g. centering dropdown under header).
public int AlignmentOffset { get; init; }
Property Value
Anchor
The anchor rectangle (e.g. header bounds of dropdown, or menu item bounds).
public Rectangle Anchor { get; init; }
Property Value
ContentSize
The desired size of the portal content.
public Size ContentSize { get; init; }
Property Value
Placement
Preferred placement direction.
public PortalPlacement Placement { get; init; }
Property Value
ScreenBounds
The available screen/window area to position within.
public Rectangle ScreenBounds { get; init; }