ClassTableCell
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:
public sealed class TableCell : BlockContainerBase, IElementWithProperties
Inheritance: objectDocumentElementBaseBlockContainerBaseTableCell
Implements:
Inherited Members
Constructors
TableCell(RadFlowDocument)
Initializes a new TableCell with default formatting and an empty block collection in the specified document.
Declaration
public TableCell(RadFlowDocument document)
Parameters
document
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
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
public static readonly StylePropertyDefinition<TableCellBorders> BordersPropertyDefinition
Field Value
CanWrapContentPropertyDefinition
Style property definition for controlling whether cell content can wrap to multiple lines during table layout.
Declaration
public static readonly StylePropertyDefinition<bool?> CanWrapContentPropertyDefinition
Field Value
ColumnSpanPropertyDefinition
Style property definition for column span, validated to ensure positive values enabling horizontal cell merging.
Declaration
public static readonly StylePropertyDefinition<int?> ColumnSpanPropertyDefinition
Field Value
IgnoreCellMarkerInRowHeightCalculationPropertyDefinition
Style property definition for controlling whether the cell marker is excluded from row height calculations.
Declaration
public static readonly StylePropertyDefinition<bool?> IgnoreCellMarkerInRowHeightCalculationPropertyDefinition
Field Value
PaddingPropertyDefinition
Style property definition for cell padding, controlling the space between cell borders and content.
Declaration
public static readonly StylePropertyDefinition<Padding> PaddingPropertyDefinition
Field Value
PreferredWidthPropertyDefinition
Style property definition for cell preferred width, supporting auto, fixed, and percentage-based width specifications.
Declaration
public static readonly StylePropertyDefinition<TableWidthUnit> PreferredWidthPropertyDefinition
Field Value
RowSpanPropertyDefinition
Style property definition for row span, validated to ensure positive values enabling vertical cell merging.
Declaration
public static readonly StylePropertyDefinition<int?> RowSpanPropertyDefinition
Field Value
ShadingPatternColorPropertyDefinition
Style property definition for shading pattern color, controlling the foreground color used in patterned cell backgrounds.
Declaration
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
public static readonly StylePropertyDefinition<ShadingPattern?> ShadingPatternPropertyDefinition
Field Value
TextDirectionPropertyDefinition
Style property definition for text layout direction within the cell, controlling horizontal, vertical, or rotated text flow.
Declaration
public static readonly StylePropertyDefinition<TextDirection> TextDirectionPropertyDefinition
Field Value
VerticalAlignmentPropertyDefinition
Style property definition for vertical positioning of content within the cell height.
Declaration
public static readonly StylePropertyDefinition<VerticalAlignment?> VerticalAlignmentPropertyDefinition
Field Value
Properties
Borders
Border styles for this cell's edges, controlling width, color, and pattern for each side independently.
Declaration
public TableCellBorders Borders { get; set; }
Property Value
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
public bool CanWrapContent { get; set; }
Property Value
The default value is true.
ColumnSpan
Number of grid columns this cell spans horizontally, enabling merged cells across multiple columns.
Declaration
public int ColumnSpan { get; set; }
Property Value
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
public int GridColumnIndex { get; }
Property Value
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
public int GridRowIndex { get; }
Property Value
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
public bool IgnoreCellMarkerInRowHeightCalculation { get; set; }
Property Value
The default value is false.
Padding
Space between the cell borders and its content, overriding the table's default cell padding when set.
Declaration
public Padding Padding { get; set; }
Property Value
The table cell padding.
PreferredWidth
Preferred width specification for this cell, supporting auto, fixed, and percentage-based widths relative to the table.
Declaration
public TableWidthUnit PreferredWidth { get; set; }
Property Value
The preferred width.
Properties
Cell formatting properties, providing access to borders, padding, vertical alignment, span settings, and text direction.
Declaration
public TableCellProperties Properties { get; }
Property Value
The properties.
Row
Parent row containing this cell, providing access to row-level formatting and sibling cells.
RowSpan
Number of grid rows this cell spans vertically, enabling merged cells across multiple rows.
Declaration
public int RowSpan { get; set; }
Property Value
The default value is 1.
Shading
Background shading applied to this cell, controlling fill color, pattern, and pattern color behind the cell content.
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.
TextDirection
Text layout direction within the cell, controlling horizontal, vertical, or rotated text flow.
Declaration
public TextDirection TextDirection { get; set; }
Property Value
The text direction.
VerticalAlignment
Vertical positioning of content within the cell height, controlling top, center, or bottom alignment.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
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.
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
public TableCell Clone(RadFlowDocument document)
Parameters
document
The document to which the cloned element should be associated.
Returns
The cloned element.