Table Class

A renderable table.
public sealed class Table : Renderable, IRenderable, IHasTableBorder, IHasBorder, IExpandable, 
    IAlignable

Constructors

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

Properties

Justify? Alignment
Gets or sets the alignment.
TableBorder Border
Gets or sets the border.
Style BorderStyle
Gets or sets the box style.
TableTitle Caption
Gets or sets the table footnote.
IReadOnlyList<TableColumn> Columns
Gets the table columns.
bool Expand
Gets or sets a value indicating whether or not the table should fit the available space. If false, the table width will be auto calculated. Defaults to false.
TableRowCollection Rows
Gets the table rows.
bool ShowFooters
Gets or sets a value indicating whether or not table footers should be shown.
bool ShowHeaders
Gets or sets a value indicating whether or not table headers should be shown.
bool ShowRowSeparators
Gets or sets a value indicating whether or not row separators should be shown.
TableTitle Title
Gets or sets the table title.
bool UseSafeBorder
Gets or sets a value indicating whether or not to use a "safe" border on legacy consoles that might not be able to render non-ASCII characters.
int? Width
Gets or sets the width of the table.

Methods

Table AddColumn(TableColumn)
Adds a column to the table.
protected override Measurement Measure(RenderOptions, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderOptions, int)
Renders the object.

Extension Methods

Table AddColumn(string, Action<TableColumn>)
Adds a column to the table.
Table AddColumns(string[])
Adds multiple columns to the table.
Table AddColumns(TableColumn[])
Adds multiple columns to the table.
Table AddEmptyRow()
Adds an empty row to the table.
Table AddRow(IEnumerable<IRenderable>)
Adds a row to the table.
Table AddRow(IRenderable[])
Adds a row to the table.
Table AddRow(string[])
Adds a row to the table.
T Alignment<Table>(Justify?)
Sets the alignment for an IAlignable object.
T Ascii2Border<Table>()
Display another ASCII border.
T AsciiBorder<Table>()
Display an ASCII border.
T AsciiDoubleHeadBorder<Table>()
Display an ASCII border with a double header border.
T Border<Table>(TableBorder)
Sets the border.
T BorderColor<Table>(Color)
Sets the border color.
T BorderStyle<Table>(Style)
Sets the border style.
Table Caption(string, Style)
Sets the table caption.
Table Caption(TableTitle)
Sets the table caption.
T Centered<Table>()
Sets the IAlignable object to be centered.
T Collapse<Table>()
Tells the specified object to not expand to the available area but take as little space as possible.
T DoubleBorder<Table>()
Display a double border.
T DoubleEdgeBorder<Table>()
Display a border with a double edge.
T Expand<Table>()
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 HeavyBorder<Table>()
Display a heavy border.
T HeavyEdgeBorder<Table>()
Display a border with a heavy edge.
T HeavyHeadBorder<Table>()
Display a border with a heavy header.
Table HideFooters()
Hides table footers.
Table HideHeaders()
Hides table headers.
Table HideRowSeparators()
Hides row separators.
T HorizontalBorder<Table>()
Display a simple border.
Table InsertRow(int, IEnumerable<IRenderable>)
Inserts a row in the table at the specified index.
Table InsertRow(int, IRenderable[])
Inserts a row in the table at the specified index.
Table InsertRow(int, string[])
Inserts a row in the table at the specified index.
T LeftAligned<Table>()
Sets the IAlignable object to be left aligned.
T MarkdownBorder<Table>()
Display a markdown border.
T MinimalBorder<Table>()
Display a minimal border.
T MinimalDoubleHeadBorder<Table>()
Display a minimal border with a double header border.
T MinimalHeavyHeadBorder<Table>()
Display a minimal border with a heavy head.
T NoBorder<Table>()
Do not display a border.
T NoSafeBorder<Table>()
Disables the safe border.
Table RemoveRow(int)
Removes a row from the table with the specified index.
T RightAligned<Table>()
Sets the IAlignable object to be right aligned.
T RoundedBorder<Table>()
Display a rounded border.
T SafeBorder<Table>()
Enables the safe border.
Table ShowFooters()
Shows table footers.
Table ShowHeaders()
Shows table headers.
Table ShowRowSeparators()
Shows row separators.
T SimpleBorder<Table>()
Display a simple border.
T SimpleHeavyBorder<Table>()
Display a simple border with heavy lines.
T SquareBorder<Table>()
Display a square border.
Table Title(string, Style)
Sets the table title.
Table Title(TableTitle)
Sets the table title.
Table UpdateCell(int, int, IRenderable)
Updates a tables cell.
Table UpdateCell(int, int, string)
Updates a tables cell.
Table Width(int?)
Sets the table width.