Table of Contents

Class HorizontalLayout

Namespace
SharpConsoleUI.Layout
Assembly
SharpConsoleUI.dll

Layout algorithm that arranges children horizontally. Similar to HorizontalGridControl behavior.

public class HorizontalLayout : ILayoutContainer
Inheritance
HorizontalLayout
Implements
Inherited Members

Properties

Spacing

Gets or sets the spacing between children.

public int Spacing { get; set; }

Property Value

int

Methods

ArrangeChildren(LayoutNode, LayoutRect)

Arranges children horizontally within the given bounds. Flex children share remaining width proportionally.

public void ArrangeChildren(LayoutNode node, LayoutRect finalRect)

Parameters

node LayoutNode
finalRect LayoutRect

MeasureChildren(LayoutNode, LayoutConstraints)

Measures all children and returns the total desired size. Width: sum of all children widths plus spacing. Height: maximum of all children heights.

public LayoutSize MeasureChildren(LayoutNode node, LayoutConstraints constraints)

Parameters

node LayoutNode
constraints LayoutConstraints

Returns

LayoutSize