Table of Contents

Class CollapsibleLayout

Namespace
SharpConsoleUI.Layout
Assembly
SharpConsoleUI.dll

Layout algorithm for CollapsiblePanel. Reserves a header region at the top of the panel and stacks the visible body children vertically beneath it. When the panel is collapsed its children are invisible and contribute no height; when expanded the body height is capped by MaxContentHeight.

public class CollapsibleLayout : ILayoutContainer
Inheritance
CollapsibleLayout
Implements
Inherited Members
Extension Methods

Methods

ArrangeChildren(LayoutNode, LayoutRect)

Arranges the visible body children stacked below the reserved header region, clamped to the available (and optionally capped) body height. Invisible children are collapsed to an empty rectangle.

public void ArrangeChildren(LayoutNode node, LayoutRect bounds)

Parameters

node LayoutNode
bounds LayoutRect

MeasureChildren(LayoutNode, LayoutConstraints)

Measures the visible body children below the reserved header region and returns the total desired size (header + capped body + margins).

public LayoutSize MeasureChildren(LayoutNode node, LayoutConstraints constraints)

Parameters

node LayoutNode
constraints LayoutConstraints

Returns

LayoutSize