Table of Contents

Class VerticalStackLayout

Namespace
SharpConsoleUI.Layout
Assembly
SharpConsoleUI.dll

Layout algorithm that stacks children vertically. Similar to ColumnContainer behavior.

public class VerticalStackLayout : ILayoutContainer
Inheritance
VerticalStackLayout
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 vertically within the given bounds. Fill children share remaining space 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: maximum of all children widths. Height: sum of all children heights plus spacing.

public LayoutSize MeasureChildren(LayoutNode node, LayoutConstraints constraints)

Parameters

node LayoutNode
constraints LayoutConstraints

Returns

LayoutSize