StackPanel

Stacks its children in a single line, vertically (default) or horizontally, with optional spacing.
public class StackPanel : Panel

Properties

Orientation

The stacking axis.

Type: Orientation

public Orientation Orientation { get; set; }

Spacing

The gap in points inserted between consecutive visible children.

Type: double

public double Spacing { get; set; }

Methods

ArrangeOverride

Content arrangement. Panels override to place their children.

protected override Size ArrangeOverride(
  Size finalSize)
ParameterSummary
Size finalSizeThe final size available for the view's content.

Returns

  • Size: The arranged content size.

MeasureOverride

Content measurement. Panels recurse; controls delegate to the native SizeThatFits.

protected override Size MeasureOverride(
  Size availableSize)
ParameterSummary
Size availableSizeThe size available for the view's content.

Returns

  • Size: The desired content size.