Grid Class

A renderable grid.
public sealed class Grid : JustInTimeRenderable, IRenderable, IExpandable, IAlignable

Constructors

Grid()
Initializes a new instance of the Grid class.

Properties

Justify? Alignment
Gets or sets the alignment.
IReadOnlyList<GridColumn> Columns
Gets the grid columns.
bool Expand
Gets 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.
IReadOnlyList<GridRow> Rows
Gets the grid rows.
int? Width
Gets or sets the width of the grid.

Methods

Grid AddColumn()
Adds a column to the grid.
Grid AddColumn(GridColumn)
Adds a column to the grid.
Grid AddRow(IRenderable[])
Adds a new row to the grid.
protected override IRenderable Build()
Builds the inner renderable.
protected override bool HasDirtyChildren()
Checks if there are any children that has changed. If so, the underlying renderable needs rebuilding.
protected void MarkAsDirty()
Marks this instance as dirty.
protected void MarkAsDirty(Action)
Marks this instance as dirty.
protected override Measurement Measure(RenderContext, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderContext, int)
Renders the object.

Extension Methods

Grid AddColumns(GridColumn[])
Adds a column to the grid.
Grid AddColumns(int)
Adds a column to the grid.
Grid AddEmptyRow()
Adds an empty row to the grid.
Grid AddRow(string[])
Adds a new row to the grid.
T Alignment<Grid>(Justify?)
Sets the alignment for an IAlignable object.
T Centered<Grid>()
Sets the IAlignable object to be centered.
T Collapse<Grid>()
Tells the specified object to not expand to the available area but take as little space as possible.
T Expand<Grid>()
Tells the specified object to expand to the available area.
IEnumerable<Segment> GetSegments(IAnsiConsole)
Gets the segments for a renderable using the specified console.
T LeftAligned<Grid>()
Sets the IAlignable object to be left aligned.
T RightAligned<Grid>()
Sets the IAlignable object to be right aligned.
Grid Width(int?)
Sets the grid width.