Table of Contents

Struct LayoutGuide

Namespace
Xui.Core.UI
Assembly
Core.dll

Encapsulates the parameters and results of a layout pass (Measure, Arrange, Render) for a view.

public struct LayoutGuide
Inherited Members

Fields

Anchor

The anchor point that defines the alignment constraint for layout. This point serves as a reference for positioning the view based on alignment. For example, if alignment is set to End, the anchor represents the bottom-right constraint. If alignment is Start, it represents the top-left constraint.

public Point Anchor

Field Value

Point

ArrangedRect

The final rectangle occupied by the view's border edge box after the Arrange pass.

public Rect ArrangedRect

Field Value

Rect

AvailableSize

The available space for measuring this view's margin box. Used during the Measure pass.

public Size AvailableSize

Field Value

Size

DesiredSize

The desired size of the view's margin box, produced during the Measure pass.

public Size DesiredSize

Field Value

Size

MeasureContext

Optional measurement context providing access to platform-specific text metrics and precise size calculations during the Measure pass. If set, text and layout measurements can use font shaping and pixel snapping consistent with the underlying rendering system.

public IMeasureContext? MeasureContext

Field Value

IMeasureContext

Pass

Indicates the type of layout pass being performed: Measure, Arrange, or Render.

public LayoutGuide.LayoutPass Pass

Field Value

LayoutGuide.LayoutPass

RenderContext

Optional rendering context for drawing during the Render pass.

public IContext? RenderContext

Field Value

IContext

XAlign

The horizontal alignment of the view within its allocated space.

public LayoutGuide.Align XAlign

Field Value

LayoutGuide.Align

XSize

How the view should size itself horizontally during measurement (exact or at-most).

public LayoutGuide.SizeTo XSize

Field Value

LayoutGuide.SizeTo

YAlign

The vertical alignment of the view within its allocated space.

public LayoutGuide.Align YAlign

Field Value

LayoutGuide.Align

YSize

How the view should size itself vertically during measurement (exact or at-most).

public LayoutGuide.SizeTo YSize

Field Value

LayoutGuide.SizeTo

Properties

IsArrange

Returns true if this guide represents an Arrange pass.

public bool IsArrange { get; }

Property Value

bool

IsMeasure

Returns true if this guide represents a Measure pass.

public bool IsMeasure { get; }

Property Value

bool

IsRender

Returns true if this guide represents a Render pass.

public bool IsRender { get; }

Property Value

bool