Class Table
Represents a table and its rows, columns, layout, and formatting.
Inherited Members
Namespace: DRIT.Document.Tables
Assembly: DRIT.Document.dll
Syntax
public class Table : CompositeNode, IEnumerable<Node>, IEnumerable
Properties
AbsoluteHorizontalDistance
Gets absolute horizontal floating table position specified by the table properties, in points. Default value is 0.
Declaration
public double AbsoluteHorizontalDistance { get; }
Property Value
| Type | Description |
|---|---|
| double |
AbsoluteVerticalDistance
Gets absolute vertical floating table position specified by the table properties, in points. Default value is 0.
Declaration
public double AbsoluteVerticalDistance { get; }
Property Value
| Type | Description |
|---|---|
| double |
Alignment
Gets or sets the horizontal alignment of the table.
Declaration
public TableAlignment Alignment { get; set; }
Property Value
| Type | Description |
|---|---|
| TableAlignment |
AllowAutoFit
Automatic resizing cells in a table is allowed to fit their contents.
Declaration
public bool AllowAutoFit { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
AllowCellSpacing
Gets or sets whether spacing between table cells is allowed.
Declaration
public bool AllowCellSpacing { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
AllowOverlap
Gets whether a floating table shall allow other floating objects in the document to overlap its extents when displayed. Default value is true.
Declaration
public bool AllowOverlap { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Bidi
Gets or sets whether this is a right-to-left table.
Declaration
public bool Bidi { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
BottomPadding
Gets or sets the amount of space (in points) to add below the contents of cells.
Declaration
public double BottomPadding { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
CellSpacing
Gets or sets the amount of space (in points) between the cells.
Declaration
public double CellSpacing { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Columns
Gets the columns in this table.
Declaration
public TableColumnCollection Columns { get; }
Property Value
| Type | Description |
|---|---|
| TableColumnCollection |
ColumnsRevision
Gets or sets the tracked revision for this table's column collection.
Declaration
public TableColumnCollectionRevision ColumnsRevision { get; set; }
Property Value
| Type | Description |
|---|---|
| TableColumnCollectionRevision |
Description
Gets or sets description of this table. It provides an alternative text representation of the information contained in the table.
Declaration
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DistanceBottom
Gets distance between table bottom and the surrounding text, in points.
Declaration
public double DistanceBottom { get; }
Property Value
| Type | Description |
|---|---|
| double |
DistanceLeft
Gets distance between table left and the surrounding text, in points.
Declaration
public double DistanceLeft { get; }
Property Value
| Type | Description |
|---|---|
| double |
DistanceRight
Gets distance between table right and the surrounding text, in points.
Declaration
public double DistanceRight { get; }
Property Value
| Type | Description |
|---|---|
| double |
DistanceTop
Gets the distance between the table top and surrounding text, in points.
Declaration
public double DistanceTop { get; }
Property Value
| Type | Description |
|---|---|
| double |
FirstRow
Returns the first Row node in the table.
Declaration
public Row FirstRow { get; }
Property Value
| Type | Description |
|---|---|
| Row |
HorizontalAnchor
Gets the base object from which the horizontal positioning of floating table should be calculated. Default value is Column.
Declaration
public RelativeHorizontalPosition HorizontalAnchor { get; }
Property Value
| Type | Description |
|---|---|
| RelativeHorizontalPosition |
LastRow
Gets the last row in the table.
Declaration
public Row LastRow { get; }
Property Value
| Type | Description |
|---|---|
| Row |
LeftIndent
Gets or sets the value that represents the left indent of the table.
Declaration
public double LeftIndent { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
LeftPadding
Gets or sets the amount of space (in points) to add to the left of the contents of cells.
Declaration
public double LeftPadding { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
NodeType
Gets the node type, which is always Table.
Declaration
public override NodeType NodeType { get; }
Property Value
| Type | Description |
|---|---|
| NodeType |
Overrides
PreferredWidth
Gets or sets the table preferred width.
Declaration
public PreferredWidth PreferredWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| PreferredWidth |
RelativeHorizontalAlignment
Gets the horizontal alignment relative to the selected anchor.
Declaration
public HorizontalAlignment RelativeHorizontalAlignment { get; }
Property Value
| Type | Description |
|---|---|
| HorizontalAlignment |
RelativeVerticalAlignment
Gets floating table relative vertical alignment.
Declaration
public VerticalAlignment RelativeVerticalAlignment { get; }
Property Value
| Type | Description |
|---|---|
| VerticalAlignment |
RightPadding
Gets or sets the space, in points, to add to the right of cell contents.
Declaration
public double RightPadding { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Rows
Gets the rows in this table.
Declaration
public RowCollection Rows { get; }
Property Value
| Type | Description |
|---|---|
| RowCollection |
Style
Gets or sets the reusable style applied to this table.
Declaration
public TableStyle Style { get; set; }
Property Value
| Type | Description |
|---|---|
| TableStyle |
StyleOptions
Gets or sets the conditional regions enabled for the table style.
Declaration
public TableStyleOptions StyleOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| TableStyleOptions |
TableFormatRevision
Gets or sets the tracked revision for this table's formatting.
Declaration
public TableFormatRevision TableFormatRevision { get; set; }
Property Value
| Type | Description |
|---|---|
| TableFormatRevision |
TextWrapping
Gets or sets how text wraps within the table.
Declaration
public TextWrapping TextWrapping { get; set; }
Property Value
| Type | Description |
|---|---|
| TextWrapping |
Title
Gets or sets the accessible title of the table.
Declaration
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TopPadding
Gets or sets the amount of space (in points) to add above the contents of cells.
Declaration
public double TopPadding { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
VerticalAnchor
Gets the vertical position reference for the floating table.
Declaration
public RelativeVerticalPosition VerticalAnchor { get; }
Property Value
| Type | Description |
|---|---|
| RelativeVerticalPosition |
Methods
AddRow(int)
Adds a row with the specified number of cells.
Declaration
public Row AddRow(int cellCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellCount | The number of cells in the new row. |
Returns
| Type | Description |
|---|---|
| Row | The newly added row. |
AutoFit(AutoFitBehavior)
Sets the automatic sizing behavior for this table.
Declaration
public void AutoFit(AutoFitBehavior behavior)
Parameters
| Type | Name | Description |
|---|---|---|
| AutoFitBehavior | behavior | The automatic sizing behavior to apply. |
InsertRow(int, int)
Inserts a row at the specified zero-based index.
Declaration
public Row InsertRow(int index, int cellCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based insertion index. |
| int | cellCount | The number of cells in the new row. |
Returns
| Type | Description |
|---|---|
| Row | The inserted row. |
RemoveRowAt(int)
Removes the row at the specified zero-based index.
Declaration
public void RemoveRowAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index to remove. |