Skip to main content

StackPanel Class

NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Controls

A panel that stacks its children in a single row or column.

public class StackPanel : Panel

Constructors

StackPanel()

public StackPanel() : this(Orientation.Vertical)

Initializes a new stack panel that stacks children vertically.

StackPanel(Orientation orientation)

public StackPanel(Orientation orientation)

Initializes a new stack panel with the given stacking orientation.

Properties

Orientation

public Orientation Orientation { get; set; }

The direction in which children are stacked.

Methods

MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)

protected override void MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)

Measures the panel as the sum of child sizes along the stacking axis.

ArrangeOverride(int arrangeWidth, int arrangeHeight)

protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)

Positions children one after another along the stacking axis.