New to Telerik Document Processing? Start a free 30-day trial

Table

Class

Container for tabular content with rows and cells; lays out columns, borders, spacing, and background for rendering in a document.

Definition

Namespace:Telerik.Documents.Fixed.Model.Editing.Tables

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

C#
public class Table : IBlockElement, IStructuralElement

Inheritance: objectTable

Implements: IBlockElementIStructuralElement

Constructors

Initialize an empty table.

C#
public Table()

Properties

Gets or sets the background color painted behind the entire table.

C#
public ColorBase Background { get; set; }
Property Value:

The background color of the table, or null for transparent background.

Gets or sets whether adjacent cell borders merge (Collapse) or remain distinct with spacing (Separate).

C#
public BorderCollapse BorderCollapse { get; set; }
Property Value:

The border collapse behavior for the table.

Gets or sets the border definitions drawn around the table's outer rectangle.

C#
public TableBorders Borders { get; set; }
Property Value:

The table borders configuration.

Gets or sets the spacing between adjacent cell borders when BorderCollapse is Separate; ignored when Collapse.

C#
public double BorderSpacing { get; set; }
Property Value:

The border spacing value in device-independent pixels. Must be greater than or equal to 0.

Gets the fallback cell properties applied when specific cells do not override them.

C#
public CellProperties DefaultCellProperties { get; }
Property Value:

The default cell properties including padding, borders, and background settings.

Gets the size computed by the last measurement, including borders and spacing.

C#
public Size DesiredSize { get; }
Property Value:

The desired size required to display the table with its current content.

Implements: IBlockElement.DesiredSize

Gets a value indicating whether this table instance has any open marked content that requires closing.

C#
public bool HasOpenMarkedContent { get; }
Property Value:

true if this instance has open marked content; otherwise, false.

Implements: IBlockElement.HasOpenMarkedContent

Gets a value indicating whether some rows or cells could not fit in the last layout and must continue later.

C#
public bool HasPendingContent { get; }
Property Value:

true if there is pending content that requires additional space; otherwise, false.

Implements: IBlockElement.HasPendingContent

Gets or sets how the table is positioned horizontally within the available width.

C#
public TableHorizontalAlignment HorizontalAlignment { get; set; }
Property Value:

The horizontal alignment value that determines table positioning.

Gets or sets the column width calculation mode used during measurement.

C#
public TableLayoutType LayoutType { get; set; }
Property Value:

The table layout type that controls how the table calculates column widths.

Margin

Thickness

Gets or sets outer margins around the table that separate it from surrounding content.

C#
public Thickness Margin { get; set; }
Property Value:

The margin thickness values for all sides of the table.

Gets the collection of rows in this table; use to add, remove, or access rows.

C#
public TableRowCollection Rows { get; }
Property Value:

The collection of table rows.

Gets or sets the StructureTag associated with this element.

C#
public StructureElement StructureTag { get; set; }

Implements: IStructuralElement.StructureTag

Methods

Draw the table into the specified editor within the given bounding rectangle.

C#
public void Draw(FixedContentEditor editor, Rect boundingRect)
Parameters:editorFixedContentEditor

The editor.

boundingRectRect

The bounding rect.

Implements: IBlockElement.Draw(FixedContentEditor, Rect)

Measure the table with infinite available size and return the desired size.

C#
[Obsolete("This method is obsolete. Use Measure(Size availableSize, CancellationToken cancellationToken) instead.")]
public Size Measure()
Returns:

Size

The measured size.

Measure the table with infinite available size and return the desired size.

C#
public Size Measure(CancellationToken cancellationToken)
Parameters:cancellationTokenCancellationToken

The cancellation token used to cancel the operation.

Returns:

Size

The measured size.

Measure the table with the specified available size and cancellation token.

C#
public Size Measure(Size availableSize, CancellationToken cancellationToken)
Parameters:availableSizeSize

The available size.

cancellationTokenCancellationToken

The cancellation token used to cancel the operation.

Returns:

Size

The result size.

Implements: IBlockElement.Measure(Size, CancellationToken)

Split the table at the last measured break point and return the remaining part.

C#
public Table Split()
Returns:

Table

The remaining block element.