Table of Contents

Class StackLayout

Namespace
BSGameLib.UI.Controls
Assembly
BSGameLib.UI.dll

A layout that stacks its children in a row or a column, in the order they were added.

public class StackLayout : LayoutControl, IUpdateable, IEquatable<IUpdateable>, IDrawable, IIdentifiable<Guid>, IEquatable<IDrawable>, IDisposable
Inheritance
StackLayout
Implements
Inherited Members

Constructors

StackLayout(ILogger, View, string)

Creates a stack layout in view.

public StackLayout(ILogger logger, View view, string id = null)

Parameters

logger ILogger
view View
id string

Properties

HorizontalAlignment

Where the children sit horizontally when the layout is wider than they need.

public HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

HorizontalSpacing

The gap between children, in pixels, when the layout runs horizontally.

public float HorizontalSpacing { get; set; }

Property Value

float

Orientation

Whether the children run across the layout or down it. Vertical by default.

public Orientation Orientation { get; set; }

Property Value

Orientation

Padding

The space kept clear inside the layout's edges, around the children.

public Spacing Padding { get; set; }

Property Value

Spacing

VerticalAlignment

Where the children sit vertically when the layout is taller than they need.

public VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

VerticalSpacing

The gap between children, in pixels, when the layout runs vertically.

public float VerticalSpacing { get; set; }

Property Value

float

Methods

ArrangeControls()

Places the visible children one after another along the stack, aligned as the layout says.

protected override void ArrangeControls()

GetDesiredSize()

The size this layout asks for: its children, with the padding and spacing it keeps.

protected override Vector2 GetDesiredSize()

Returns

Vector2