A renderable grid.
Constructors
public Grid()
Initializes a new instance of the Grid class.
Properties
Columns
: IReadOnlyList<GridColumn>Gets the grid columns.
Expand
: boolGets or sets a value indicating whether or not the object should expand to the available space. If false, the object's width will be auto calculated.
Rows
: IReadOnlyList<GridRow>Gets the grid rows.
Width
: int?Gets or sets the width of the grid.
Methods
public Grid AddColumn()
Adds a column to the grid.
Returns:
The same instance so that multiple calls can be chained.
public Grid AddColumn(GridColumn column)
Adds a column to the grid.
Parameters:
column (GridColumn)Returns:
The same instance so that multiple calls can be chained.
public Grid AddRow(IRenderable[] columns)
Adds a new row to the grid.
Parameters:
columns (IRenderable[])Returns:
The same instance so that multiple calls can be chained.
Extension Methods
Grid AddColumns(this Grid grid, int count)Adds a column to the grid.
Returns:
The same instance so that multiple calls can be chained.
Grid AddColumns(this Grid grid, GridColumn[] columns)Adds a column to the grid.
Returns:
The same instance so that multiple calls can be chained.
Grid AddEmptyRow(this Grid grid)Adds an empty row to the grid.
Returns:
The same instance so that multiple calls can be chained.
Grid AddRow(this Grid grid, string[] columns)Adds a new row to the grid.
Returns:
The same instance so that multiple calls can be chained.
Grid Width(this Grid grid, int? width)Sets the grid width.
Returns:
The same instance so that multiple calls can be chained.