Layout

Represents a renderable to divide a fixed height into rows or columns.

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)
The layout name.
public Layout(IRenderable renderable)

Initializes a new instance of the Layout class.

Parameters:

renderable (IRenderable)
The renderable.
public Layout(string name = null, IRenderable renderable = null)

Initializes a new instance of the Layout class.

Parameters:

name (string)
The layout name.
renderable (IRenderable)
The renderable.

Properties

IsVisible : bool

Gets or sets a value indicating whether or not the layout should be visible or not.

Item : Layout

Gets a child layout by it's name.

MinimumSize : int

Gets or sets the minimum width.

Name : string

Gets or sets the name.

Ratio : int

Gets 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)
The layout name.

Returns:

The specified child Layout.

public Layout SplitColumns(Layout[] children)

Splits the layout into columns.

Parameters:

children (Layout[])
The layout to split into columns.

Returns:

The same instance so that multiple calls can be chained.

public Layout SplitRows(Layout[] children)

Splits the layout into rows.

Parameters:

children (Layout[])
The layout to split into rows.

Returns:

The same instance so that multiple calls can be chained.

public Layout Update(IRenderable renderable)

Updates the containing IRenderable.

Parameters:

renderable (IRenderable)
The renderable to use for this layout.

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.