Represents a renderable to divide a fixed height into rows or columns.
Constructors
public Layout(string name)
Initializes a new instance of the Layout class.
Parameters:
name (string)public Layout(IRenderable renderable)
Initializes a new instance of the Layout class.
Parameters:
renderable (IRenderable)public Layout(string name = null, IRenderable renderable = null)
Initializes a new instance of the Layout class.
Parameters:
name (string)renderable (IRenderable)Properties
IsVisible
: boolGets or sets a value indicating whether or not the layout should be visible or not.
Item
: LayoutGets a child layout by it's name.
MinimumSize
: intGets or sets the minimum width.
Name
: stringGets or sets the name.
Ratio
: intGets or sets the ratio.
Size
: int?Gets or sets the width.
Methods
public Layout GetLayout(string name)
Gets a child layout by it's name.
Parameters:
name (string)Returns:
The specified child Layout.
public Layout SplitColumns(Layout[] children)
Splits the layout into columns.
Parameters:
children (Layout[])Returns:
The same instance so that multiple calls can be chained.
public Layout SplitRows(Layout[] children)
Splits the layout into rows.
Parameters:
children (Layout[])Returns:
The same instance so that multiple calls can be chained.
public Layout Update(IRenderable renderable)
Updates the containing IRenderable.
Parameters:
renderable (IRenderable)Returns:
The same instance so that multiple calls can be chained.
Extension Methods
Layout MinimumSize(this Layout layout, int size)Sets the minimum width of the layout.
Returns:
The same instance so that multiple calls can be chained.
Layout Ratio(this Layout layout, int ratio)Sets the ratio of the layout.
Returns:
The same instance so that multiple calls can be chained.
Layout Size(this Layout layout, int size)Sets the size of the layout.
Returns:
The same instance so that multiple calls can be chained.