Class
TableCell

Cell within a table grid containing block-level content, supporting row/column spanning, borders, padding, vertical alignment, and text direction.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

cs-api-definition
public sealed class TableCell : BlockContainerBase, IElementWithProperties

Inheritance: objectDocumentElementBaseBlockContainerBaseTableCell

Implements: IElementWithProperties

Inherited Members BlockContainerBase.BlocksDocumentElementBase.EnumerateChildrenOfType<T>()DocumentElementBase.DocumentDocumentElementBase.Parent

Constructors

TableCell(RadFlowDocument)

Initializes a new TableCell with default formatting and an empty block collection in the specified document.

Declaration

cs-api-definition
public TableCell(RadFlowDocument document)

Parameters

document

RadFlowDocument

The document in which the element will be added.

Fields

BackgroundColorPropertyDefinition

Style property definition for cell background fill color applied behind the cell content.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<ThemableColor> BackgroundColorPropertyDefinition

Field Value

StylePropertyDefinition<ThemableColor>

BordersPropertyDefinition

Style property definition for cell borders, controlling the width, color, and pattern for each edge independently.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<TableCellBorders> BordersPropertyDefinition

Field Value

StylePropertyDefinition<TableCellBorders>

CanWrapContentPropertyDefinition

Style property definition for controlling whether cell content can wrap to multiple lines during table layout.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?> CanWrapContentPropertyDefinition

Field Value

StylePropertyDefinition<bool?>

ColumnSpanPropertyDefinition

Style property definition for column span, validated to ensure positive values enabling horizontal cell merging.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<int?> ColumnSpanPropertyDefinition

Field Value

StylePropertyDefinition<int?>

IgnoreCellMarkerInRowHeightCalculationPropertyDefinition

Style property definition for controlling whether the cell marker is excluded from row height calculations.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?> IgnoreCellMarkerInRowHeightCalculationPropertyDefinition

Field Value

StylePropertyDefinition<bool?>

PaddingPropertyDefinition

Style property definition for cell padding, controlling the space between cell borders and content.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<Padding> PaddingPropertyDefinition

Field Value

StylePropertyDefinition<Padding>

PreferredWidthPropertyDefinition

Style property definition for cell preferred width, supporting auto, fixed, and percentage-based width specifications.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<TableWidthUnit> PreferredWidthPropertyDefinition

Field Value

StylePropertyDefinition<TableWidthUnit>

RowSpanPropertyDefinition

Style property definition for row span, validated to ensure positive values enabling vertical cell merging.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<int?> RowSpanPropertyDefinition

Field Value

StylePropertyDefinition<int?>

ShadingPatternColorPropertyDefinition

Style property definition for shading pattern color, controlling the foreground color used in patterned cell backgrounds.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<ThemableColor> ShadingPatternColorPropertyDefinition

Field Value

StylePropertyDefinition<ThemableColor>

ShadingPatternPropertyDefinition

Style property definition for shading pattern, controlling the fill pattern applied to the cell background.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<ShadingPattern?> ShadingPatternPropertyDefinition

Field Value

StylePropertyDefinition<ShadingPattern?>

TextDirectionPropertyDefinition

Style property definition for text layout direction within the cell, controlling horizontal, vertical, or rotated text flow.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<TextDirection> TextDirectionPropertyDefinition

Field Value

StylePropertyDefinition<TextDirection>

VerticalAlignmentPropertyDefinition

Style property definition for vertical positioning of content within the cell height.

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<VerticalAlignment?> VerticalAlignmentPropertyDefinition

Field Value

StylePropertyDefinition<VerticalAlignment?>

Properties

Borders

Border styles for this cell's edges, controlling width, color, and pattern for each side independently.

Declaration

cs-api-definition
public TableCellBorders Borders { get; set; }

Property Value

TableCellBorders

The borders.

CanWrapContent

Controls whether content can wrap to multiple lines during table layout; when false, content remains on a single line expanding cell width.

Declaration

cs-api-definition
public bool CanWrapContent { get; set; }

Property Value

bool

The default value is true.

ColumnSpan

Number of grid columns this cell spans horizontally, enabling merged cells across multiple columns.

Declaration

cs-api-definition
public int ColumnSpan { get; set; }

Property Value

int

The default value is 1.

GridColumnIndex

Zero-based column index of this cell in the table grid, automatically calculated based on cell positions and column spans.

Declaration

cs-api-definition
public int GridColumnIndex { get; }

Property Value

int

The column index of the cell in the table grid.

GridRowIndex

Zero-based row index of this cell in the table grid, automatically calculated based on cell positions and row spans.

Declaration

cs-api-definition
public int GridRowIndex { get; }

Property Value

int

The row index of the cell in the table grid.

IgnoreCellMarkerInRowHeightCalculation

Controls whether the cell marker (end-of-cell character) is excluded from row height calculations, affecting minimum row sizing.

Declaration

cs-api-definition
public bool IgnoreCellMarkerInRowHeightCalculation { get; set; }

Property Value

bool

The default value is false.

Padding

Space between the cell borders and its content, overriding the table's default cell padding when set.

Declaration

cs-api-definition
public Padding Padding { get; set; }

Property Value

Padding

The table cell padding.

PreferredWidth

Preferred width specification for this cell, supporting auto, fixed, and percentage-based widths relative to the table.

Declaration

cs-api-definition
public TableWidthUnit PreferredWidth { get; set; }

Property Value

TableWidthUnit

The preferred width.

Properties

Cell formatting properties, providing access to borders, padding, vertical alignment, span settings, and text direction.

Declaration

cs-api-definition
public TableCellProperties Properties { get; }

Property Value

TableCellProperties

The properties.

Row

Parent row containing this cell, providing access to row-level formatting and sibling cells.

Declaration

cs-api-definition
public TableRow Row { get; }

Property Value

TableRow

The row.

RowSpan

Number of grid rows this cell spans vertically, enabling merged cells across multiple rows.

Declaration

cs-api-definition
public int RowSpan { get; set; }

Property Value

int

The default value is 1.

Shading

Background shading applied to this cell, controlling fill color, pattern, and pattern color behind the cell content.

Declaration

cs-api-definition
public Shading Shading { get; }

Property Value

Shading

The shading.

Table

Parent table containing this cell, providing access to table-level formatting and the grid structure, or null if the cell is not yet in a row.

Declaration

cs-api-definition
public Table Table { get; }

Property Value

Table

The table.

TextDirection

Text layout direction within the cell, controlling horizontal, vertical, or rotated text flow.

Declaration

cs-api-definition
public TextDirection TextDirection { get; set; }

Property Value

TextDirection

The text direction.

VerticalAlignment

Vertical positioning of content within the cell height, controlling top, center, or bottom alignment.

Declaration

cs-api-definition
public VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

The default value is Top.

Methods

Clone()

Creates a deep copy of this cell including all blocks and formatting properties, associated to the same document.

Declaration

cs-api-definition
public TableCell Clone()

Returns

TableCell

The cloned element.

Clone(RadFlowDocument)

Creates a deep copy of this cell including all blocks and formatting properties, associated to the specified document for cross-document copying.

Declaration

cs-api-definition
public TableCell Clone(RadFlowDocument document)

Parameters

document

RadFlowDocument

The document to which the cloned element should be associated.

Returns

TableCell

The cloned element.