Table Class

Defines a table that contains an optional TableRow.

public class Table : ContainerBlock
Inheritance
ContainerBlock Table

Constructors

NameDescription
Table()Initializes a new instance of the Table class.
Table(BlockParser?)Initializes a new instance of the Table class.

Table overloads

Table()

Table.cs

Initializes a new instance of the Table class.

public Table()

Table(BlockParser?)

Table.cs

Initializes a new instance of the Table class.

public Table(BlockParser? parser)
Parameters
parser BlockParser?
The parser used to create this block.

Properties

NameDescription
ColumnDefinitionsGets or sets the column alignments. May be null.

ColumnDefinitions

Table.cs

Gets or sets the column alignments. May be null.

public List<TableColumnDefinition> ColumnDefinitions { get; }

Methods

NameDescription
IsValid()Checks if the table structure is valid.
NormalizeUsingHeaderRow()Normalizes the number of columns of this table by taking the amount of columns defined in the header and appending empty cells or removing extra cells as needed.
NormalizeUsingMaxWidth()Normalizes the number of columns of this table by taking the maximum columns and appending empty cells.

IsValid()

Table.cs

Checks if the table structure is valid.

public bool IsValid()

Returns

bool True if the table has rows and the number of cells per row is correct, other wise false.

NormalizeUsingHeaderRow()

Table.cs

Normalizes the number of columns of this table by taking the amount of columns defined in the header and appending empty cells or removing extra cells as needed.

public void NormalizeUsingHeaderRow()

Remarks

Short rows are not completed when more than 524,288 empty cells would be needed.

NormalizeUsingMaxWidth()

Table.cs

Normalizes the number of columns of this table by taking the maximum columns and appending empty cells.

public void NormalizeUsingMaxWidth()

Remarks

Rows are left unchanged when more than 524,288 empty cells would be needed.