StackLayoutItem

References
[ContentProperty("Control")] [TypeConverter(StackLayoutItemConverter)] public class StackLayoutItem
Item for a single control in a StackLayout.

Constructors

StackLayoutItem

#
public StackLayoutItem(Control control, bool expand = false)
Initializes a new instance of the StackLayoutItem class.
control (Control)Control for the item.
expand (bool = false)Whether the control expands to fill space along the direction of the layout

StackLayoutItem

#
public StackLayoutItem(Control control, HorizontalAlignment? alignment, bool expand = false)
Initializes a new instance of the StackLayoutItem class when the StackLayout.Orientation is Vertical.
control (Control)Control for the item.
alignment (HorizontalAlignment?)Horizontal alignment of the control for vertical layouts.
expand (bool = false)Whether the control expands to fill space along the direction of the layout

StackLayoutItem

#
public StackLayoutItem(Control control, VerticalAlignment? alignment, bool expand = false)
Initializes a new instance of the StackLayoutItem class when the StackLayout.Orientation is Horizontal.
control (Control)Control for the item.
alignment (VerticalAlignment?)Vertical alignment of the control for horizontal layouts.
expand (bool = false)Whether the control expands to fill space along the direction of the layout

Properties

Control

#
public Control Control { get; set; }
Gets or sets the control for this item.

Expand

#
public bool Expand { get; set; }
Gets or sets a value indicating whether the control expands to available space in the direction of the layout.

HorizontalAlignment

#
public HorizontalAlignment? HorizontalAlignment { get; set; }
Gets or sets the horizontal alignment for the control for vertical stack layouts, or null to use StackLayout.HorizontalContentAlignment.

VerticalAlignment

#
public VerticalAlignment? VerticalAlignment { get; set; }
Gets or sets the vertical alignment for the control for horizontal stack layouts, or null to use StackLayout.VerticalContentAlignment.

Convertors

OperationResultDescription
implicitControlStackLayoutItemConverts a control to a StackLayoutItem implicitly.
implicitImageStackLayoutItemConverts an Image to a StackLayoutItem with an ImageView control implicitly.
implicitstringStackLayoutItemConverts a string to a StackLayoutItem with a label control implicitly.