StackPanel class Core

The one geometry source of a control tree: a stack (vertical or horizontal) whose children are Fixed, Auto (their measured size) or Fill (share of the leftover). Measure and Arrange derive from the SAME child specification, so a pane's desired size and its layout can never drift apart — the successor of the per-pane y-accumulation walks that existed five times per pane.

public sealed class StackPanel : Panel
Namespace
ArionUI.Presentation.Controls
Package
ArionUI.Presentation · dotnet add package ArionUI.Presentation --prerelease
Inherits
Panel

Constructors

StackPanel

public StackPanel();

Fields

Auto

public const double Auto = -1;

Child takes its measured size along the main axis.

Fill

public const double Fill = -2;

Child shares the space left after Fixed/Auto children.

Properties

Gap

public double Gap { get; init; }

Space between VISIBLE children — so a form with condition-dependent rows (the rule dialog) keeps its rhythm without per-row spacer bookkeeping.

Horizontal

public bool Horizontal { get; init; }

MainPadding

public double MainPadding { get; init; }

Padding along the main axis (top+bottom of a vertical stack).

Methods

Add

public StackPanel Add(Control child, double main = -1, double cross = -1, double marginStart = 0, double marginEnd = 0);

Arrange

public override void Arrange(LogRect bounds);

Measure

public override LogSize Measure(LogSize available);