ClassTable
Grid-based block element organizing content into rows and cells, supporting cell spanning, borders, shading, and automatic grid layout calculation.
Definition
Namespace:Telerik.Windows.Documents.Flow.Model
Assembly:Telerik.Windows.Documents.Flow.dll
Syntax:
public sealed class Table : BlockBase, IElementWithStyle, IElementWithProperties
Inheritance: objectDocumentElementBaseBlockBaseTable
Implements:
Inherited Members
Constructors
Table(RadFlowDocument)
Initializes a new empty Table with no rows or columns in the specified document.
Declaration
public Table(RadFlowDocument document)
Parameters
document
The document in which the element will be added.
Table(RadFlowDocument, int, int)
Initializes a new Table pre-populated with the specified number of rows and columns, each containing an empty cell.
Declaration
public Table(RadFlowDocument document, int rows, int columns)
Parameters
document
The document.
rows
The number of rows.
columns
The number of columns.
Fields
AlignmentPropertyDefinition
Style property definition for table horizontal alignment within the page or column.
Declaration
public static readonly StylePropertyDefinition<Alignment?> AlignmentPropertyDefinition
Field Value
BackgroundColorPropertyDefinition
Style property definition for table background fill color applied behind all cells.
Declaration
public static readonly StylePropertyDefinition<ThemableColor> BackgroundColorPropertyDefinition
Field Value
StylePropertyDefinition<ThemableColor>
ColumnBandingPropertyDefinition
Style property definition for the number of columns in each alternating column band when applying conditional table formatting.
Declaration
public static readonly StylePropertyDefinition<int?> ColumnBandingPropertyDefinition
Field Value
FlowDirectionPropertyDefinition
Style property definition for cell flow direction, controlling left-to-right or right-to-left cell ordering and content layout.
Declaration
public static readonly StylePropertyDefinition<FlowDirection?> FlowDirectionPropertyDefinition
Field Value
IndentPropertyDefinition
Style property definition for horizontal indentation added before the table's leading edge in device independent pixels (1/96 inch).
Declaration
public static readonly StylePropertyDefinition<double?> IndentPropertyDefinition
Field Value
LayoutTypePropertyDefinition
Style property definition for table layout algorithm, controlling whether column widths are automatically calculated or use fixed values.
Declaration
public static readonly StylePropertyDefinition<TableLayoutType?> LayoutTypePropertyDefinition
Field Value
LooksPropertyDefinition
Style property definition for conditional formatting components (first/last row/column, banded rows/columns) applied from the table style.
Declaration
public static readonly StylePropertyDefinition<TableLooks?> LooksPropertyDefinition
Field Value
OverlapPropertyDefinition
Style property definition for controlling whether floating tables can overlap this table's area when positioned.
Declaration
public static readonly StylePropertyDefinition<bool?> OverlapPropertyDefinition
Field Value
PreferredWidthPropertyDefinition
Style property definition for table preferred width, supporting auto, fixed, and percentage-based width specifications.
Declaration
public static readonly StylePropertyDefinition<TableWidthUnit> PreferredWidthPropertyDefinition
Field Value
RowBandingPropertyDefinition
Style property definition for the number of rows in each alternating row band when applying conditional table formatting.
Declaration
public static readonly StylePropertyDefinition<int?> RowBandingPropertyDefinition
Field Value
ShadingPatternColorPropertyDefinition
Style property definition for shading pattern color, controlling the foreground color used in patterned background fills.
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 table background.
Declaration
public static readonly StylePropertyDefinition<ShadingPattern?> ShadingPatternPropertyDefinition
Field Value
TableBordersPropertyDefinition
Style property definition for table borders, controlling the width, color, and pattern for outer and inner border lines.
Declaration
public static readonly StylePropertyDefinition<TableBorders> TableBordersPropertyDefinition
Field Value
TableCellPaddingPropertyDefinition
Style property definition for default cell padding applied to all cells unless overridden at the cell level.
Declaration
public static readonly StylePropertyDefinition<Padding> TableCellPaddingPropertyDefinition
Field Value
TableCellSpacingPropertyDefinition
Style property definition for spacing between adjacent cells and between cells and table edges in device independent pixels (1/96 inch).
Declaration
public static readonly StylePropertyDefinition<double?> TableCellSpacingPropertyDefinition
Field Value
Properties
Alignment
Horizontal alignment of the table within the page or column, controlling left, center, or right positioning.
Declaration
public Alignment Alignment { get; set; }
Property Value
The default value is Left.
Borders
Border styles for the table's edges and internal dividers, controlling width, color, and pattern for outer and inner borders.
Declaration
public TableBorders Borders { get; set; }
Property Value
The borders.
FlowDirection
Flow direction for cell content and table layout, controlling left-to-right or right-to-left cell ordering and text direction.
Declaration
public FlowDirection FlowDirection { get; set; }
Property Value
The default value is LeftToRight.
GridColumnsCount
Number of columns in the calculated table grid, accounting for cell column spans; automatically computed from table structure.
Declaration
public int GridColumnsCount { get; }
Property Value
The grid columns count.
GridRowsCount
Number of rows in the calculated table grid, accounting for cell row spans; automatically computed from table structure.
Declaration
public int GridRowsCount { get; }
Property Value
The grid rows count.
HasCellSpacing
Indicates whether cell spacing is applied, determined by checking if TableCellSpacing exceeds zero.
Declaration
public bool HasCellSpacing { get; }
Property Value
True if there is cell spacing.
Indent
Distance added before the leading edge of the table in device independent pixels (1/96 inch), shifting the table horizontally.
Declaration
public double Indent { get; set; }
Property Value
The default value is 0.
LayoutType
Layout algorithm applied to the table, controlling whether column widths are automatically calculated (AutoFit) or use fixed widths.
Declaration
public TableLayoutType LayoutType { get; set; }
Property Value
The default value is AutoFit.
Looks
Controls which conditional formatting components of the table style are applied, such as first/last row, first/last column, and banded rows/columns.
Declaration
public TableLooks Looks { get; set; }
Property Value
The default value is BandedRows | BandedColumns.
Overlap
Controls whether this floating table allows other floating tables to overlap its area when positioned on the page.
Declaration
public bool Overlap { get; set; }
Property Value
The default value is true.
PreferredWidth
Preferred width specification for the table, supporting auto, fixed, and percentage-based widths relative to the container.
Declaration
public TableWidthUnit PreferredWidth { get; set; }
Property Value
The width of the preferred.
Properties
Table formatting properties, providing access to alignment, borders, spacing, padding, width, layout algorithm, and flow direction settings.
Declaration
public TableProperties Properties { get; }
Property Value
The properties.
Rows
Collection of rows contained in this table, providing add, insert, and remove operations for table structure.
Declaration
public TableRowCollection Rows { get; }
Property Value
The rows.
Shading
Background shading applied to the entire table, controlling fill color, pattern, and pattern color behind all cells.
StyleId
Table style identifier applied to this table, enabling consistent formatting via style inheritance from the document's style repository.
Declaration
public string StyleId { get; set; }
Property Value
The style id.
Implements
TableCellPadding
Default padding for all cells in this table, defining the space between cell borders and content unless overridden at the cell level.
Declaration
public Padding TableCellPadding { get; set; }
Property Value
The table cell padding.
TableCellSpacing
Space between adjacent cells and between cells and table edges in device independent pixels (1/96 inch), creating visual separation.
Declaration
public double TableCellSpacing { get; set; }
Property Value
The table cell spacing.
Methods
Clone()
Creates a deep copy of this table including all rows, cells, and formatting properties, associated to the same document.
Clone(RadFlowDocument)
Creates a deep copy of this table including all rows, cells, and formatting properties, associated to the specified document for cross-document copying.
Declaration
public Table Clone(RadFlowDocument document)
Parameters
document
The document to which the cloned element should be associated.
Returns
The cloned element.
OnChildAdded(DocumentElementBase)
Called when child element is added.
Declaration
protected override void OnChildAdded(DocumentElementBase child)
Parameters
child
The child element.
Overrides
OnChildRemoved(DocumentElementBase)
Called when child element is removed.
Declaration
protected override void OnChildRemoved(DocumentElementBase child)
Parameters
child
The child element.
Overrides