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
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
nodeLayoutNodefinalRectLayoutRect
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
nodeLayoutNodeconstraintsLayoutConstraints