Table of Contents

Struct LayoutGuide

Namespace
Xui.Core.UI
Assembly
Xui.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

CurrentTime

The time of the current animation frame for this view. For Measure/Arrange/Render passes, this may be Zero.

public TimeSpan CurrentTime

Field Value

TimeSpan

DesiredSize

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

public Size DesiredSize

Field Value

Size

Instruments

Instrumentation accessor for zero-alloc logging during layout passes.

public InstrumentsAccessor Instruments

Field Value

InstrumentsAccessor

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

PreviousTime

The time of the previous animation frame.

public TimeSpan PreviousTime

Field Value

TimeSpan

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

IsAnimate

Returns true if this guide represents an animation pass.

public bool IsAnimate { get; }

Property Value

bool

IsArrange

Returns true if this guide represents an Arrange pass.

public bool IsArrange { get; }

Property Value

bool

IsLuminarFlow

Returns true if all four passes are requested (Animate, Measure, Arrange, Render), meaning the view can process the full pipeline in a single DFS walk via View.ForkUpdate.

public bool IsLuminarFlow { 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