Table of Contents

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

Anchor Rectangle

The anchor rectangle (e.g. header bounds of dropdown, or menu item bounds).

ContentSize Size

The desired size of the portal content.

ScreenBounds Rectangle

The available screen/window area to position within.

Placement PortalPlacement

Preferred placement direction.

AlignmentOffset int

Optional 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

int

Anchor

The anchor rectangle (e.g. header bounds of dropdown, or menu item bounds).

public Rectangle Anchor { get; init; }

Property Value

Rectangle

ContentSize

The desired size of the portal content.

public Size ContentSize { get; init; }

Property Value

Size

Placement

Preferred placement direction.

public PortalPlacement Placement { get; init; }

Property Value

PortalPlacement

ScreenBounds

The available screen/window area to position within.

public Rectangle ScreenBounds { get; init; }

Property Value

Rectangle