Constructors
StackLayoutItem
#Initializes a new instance of the StackLayoutItem class.
StackLayoutItem
#Initializes a new instance of the StackLayoutItem class when the StackLayout.Orientation is Vertical.
Parameters:
| 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
#Initializes a new instance of the StackLayoutItem class when the StackLayout.Orientation is Horizontal.
Parameters:
| 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
Expand
#Gets or sets a value indicating whether the control expands to available space in the direction of the layout.
Value:
true to expand; otherwise, false.HorizontalAlignment
#Gets or sets the horizontal alignment for the control for vertical stack layouts, or null to use StackLayout.HorizontalContentAlignment.
Value: The horizontal alignment of the control.
VerticalAlignment
#Gets or sets the vertical alignment for the control for horizontal stack layouts, or null to use StackLayout.VerticalContentAlignment.
Value: The vertical alignment of the control.
Convertors
| Operation | Result | Description | ||
|---|---|---|---|---|
| implicit | Control | StackLayoutItem | Converts a control to a StackLayoutItem implicitly. | |
| implicit | Image | StackLayoutItem | Converts an Image to a StackLayoutItem with an ImageView control implicitly. | |
| implicit | string | StackLayoutItem | Converts a string to a StackLayoutItem with a label control implicitly. | |