Class
TableProperties

Manages formatting properties for Table elements including borders, shading, alignment, width, cell spacing, and conditional style application with style inheritance.

Definition

Properties

Alignment

Horizontal alignment of the table within its container, affecting table position on the page.

Declaration

cs-api-definition
public IStyleProperty<Alignment?> Alignment { get; }

Property Value

IStyleProperty<Alignment?>

The default value is Left.

BackgroundColor

Background color applied beneath any shading pattern, supporting theme-aware colors.

Declaration

cs-api-definition
public IStyleProperty<ThemableColor> BackgroundColor { get; }

Property Value

IStyleProperty<ThemableColor>

The color of the background.

Implements IPropertiesWithShading.BackgroundColor

Borders

Border styles for all table edges including outer borders and inside dividers.

Declaration

cs-api-definition
public IStyleProperty<TableBorders> Borders { get; }

Property Value

IStyleProperty<TableBorders>

The top border.

ColumnBanding

Number of columns in each alternating band when applying conditional column banding styles.

Declaration

cs-api-definition
public IStyleProperty<int?> ColumnBanding { get; }

Property Value

IStyleProperty<int?>

The default value is 0.

FlowDirection

Flow direction of cell content within the table; local property that cannot be inherited from styles.

Declaration

cs-api-definition
public IStyleProperty<FlowDirection?> FlowDirection { get; }

Property Value

IStyleProperty<FlowDirection?>

The default value is LeftToRight.

Indent

Indentation added before the leading edge of the table, measured in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> Indent { get; }

Property Value

IStyleProperty<double?>

The default value is 0.

LayoutType

Layout algorithm used to size table columns (AutoFit or FixedWidth); local property that cannot be inherited from styles.

Declaration

cs-api-definition
public IStyleProperty<TableLayoutType?> LayoutType { get; }

Property Value

IStyleProperty<TableLayoutType?>

The default value is AutoFit.

Looks

Specifies which conditional style components to apply (first row, last row, banded rows, etc.); local property that cannot be inherited from styles.

Declaration

cs-api-definition
public IStyleProperty<TableLooks?> Looks { get; }

Property Value

IStyleProperty<TableLooks?>

The default value is BandedRows | BandedColumns.

Overlap

Determines whether this floating table allows overlapping with other floating tables; local property that cannot be inherited from styles.

Declaration

cs-api-definition
public IStyleProperty<bool?> Overlap { get; }

Property Value

IStyleProperty<bool?>

The default value is true.

PreferredWidth

Preferred width of the table; local property that cannot be inherited from styles.

Declaration

cs-api-definition
public IStyleProperty<TableWidthUnit> PreferredWidth { get; }

Property Value

IStyleProperty<TableWidthUnit>

The preferred width.

RowBanding

Number of rows in each alternating band when applying conditional row banding styles.

Declaration

cs-api-definition
public IStyleProperty<int?> RowBanding { get; }

Property Value

IStyleProperty<int?>

The default value is 0.

ShadingPattern

Pattern used to lay the foreground color over the background color, defining the visual shading style.

Declaration

cs-api-definition
public IStyleProperty<ShadingPattern?> ShadingPattern { get; }

Property Value

IStyleProperty<ShadingPattern?>

The default value is Clear

Implements IPropertiesWithShading.ShadingPattern

ShadingPatternColor

Foreground pattern color layered over the background color when a shading pattern is applied.

Declaration

cs-api-definition
public IStyleProperty<ThemableColor> ShadingPatternColor { get; }

Property Value

IStyleProperty<ThemableColor>

The color of the pattern.

Implements IPropertiesWithShading.ShadingPatternColor

TableCellPadding

Default padding applied to all cells within the table unless overridden at the cell level.

Declaration

cs-api-definition
public IStyleProperty<Padding> TableCellPadding { get; }

Property Value

IStyleProperty<Padding>

The table cell padding.

TableCellSpacing

Spacing between adjacent cells and table edges, measured in device-independent pixels (1/96 inch).

Declaration

cs-api-definition
public IStyleProperty<double?> TableCellSpacing { get; }

Property Value

IStyleProperty<double?>

The default value is 0.

Methods

EnumerateStyleProperties()

Enumerates the style properties.

Declaration

cs-api-definition
protected override IEnumerable<IStyleProperty> EnumerateStyleProperties()

Returns

IEnumerable<IStyleProperty>

The style properties.

Overrides DocumentElementPropertiesBase.EnumerateStyleProperties()

GetStylePropertyOverride(IStylePropertyDefinition)

Gets specific style property or null.

Declaration

cs-api-definition
protected override IStyleProperty GetStylePropertyOverride(IStylePropertyDefinition propertyDefinition)

Parameters

propertyDefinition

IStylePropertyDefinition

The property definition.

Returns

IStyleProperty

Overrides DocumentElementPropertiesBase.GetStylePropertyOverride(IStylePropertyDefinition)