Class StackLayout
A layout that places elements adjacent to each other with optional spacing between each element
public sealed class StackLayout : Layout, ILayoutParent
- Inheritance
-
StackLayout
- Implements
- Inherited Members
- Extension Methods
Remarks
Each panel will be as large as the largest child in one direction, and as large as the child in the panel in the other direction. The panel will be as large as needed to fit each child with the specified spacing and orientation
Constructors
StackLayout(LayoutRoot, string)
Creates a stack layout
public StackLayout(LayoutRoot onLayout, string name = "New StackLayout")
Parameters
onLayout
LayoutRootThe layout root to draw the stack layout on
name
stringThe name of the stack layout
Properties
Orientation
The orientation/flow direction of the layout
public Orientation Orientation { get; set; }
Property Value
Spacing
The spacing between elements in this layout
public float Spacing { get; set; }
Property Value
Methods
ArrangeOverride(Vector2)
Internal implementation to position the object within the allocated space.
protected override void ArrangeOverride(Vector2 alignedTopLeftCorner)
Parameters
alignedTopLeftCorner
Vector2The space available for the element.
DestroyOverride()
Internal implementation to perform any additional cleanup when the element is destroyed
protected override void DestroyOverride()
MeasureOverride()
Internal implementation to calculate desired size.
protected override Vector2 MeasureOverride()