TableStyle Class
Represents a style which can be applied to one or more Tables within a document content.
- Inheritance:
- System.ObjectTableStyle
Remarks
Styles provide a way to format your document in a consistent way so when you change your formatting options on a style, all document elements referencing that style will be changed.
To apply a TableStyle to a Table, set it to a Style property on a TableFormat.
For more information about table styles, see table styles article and table styles example.
Constructors
TableStyle(String)
Initializes a new instance of the TableStyle class.
Parameters
name
- System.String
The style name.
Properties
BaseStyle
Gets or sets the style on which this style is based.
Property Value
The base style.
CellFormat
Gets or sets the table cell format.
public TableCellFormat CellFormat { get; set; }
Public Property CellFormat As TableCellFormat
Property Value
The table cell format.
CharacterFormat
Gets or sets the character format.
public CharacterFormat CharacterFormat { get; set; }
Public Property CharacterFormat As CharacterFormat
Property Value
The character format.
ConditionalFormats
Gets a collection of conditional TableStyleFormats.
public TableStyleFormatCollection ConditionalFormats { get; }
Public ReadOnly Property ConditionalFormats As TableStyleFormatCollection
Property Value
A collection of conditional TableStyleFormats.
Remarks
Table style conditional formats are applied to different regions of the table and allow you to define all formatting properties (formatting for a table, rows, cells, paragraphs and runs).
For more information about table styles, see table styles article and table styles example.
Document
Gets the owner document.
public override DocumentModel Document { get; protected set; }
Public Overrides Property Document As DocumentModel
Property Value
The owner document.
Overrides
ParagraphFormat
Gets or sets the paragraph format.
public ParagraphFormat ParagraphFormat { get; set; }
Public Property ParagraphFormat As ParagraphFormat
Property Value
The paragraph format.
RowFormat
Gets or sets the table row format.
Property Value
The table row format.
StyleType
Gets the type of the style.
public override StyleType StyleType { get; }
Public Overrides ReadOnly Property StyleType As StyleType
Property Value
The type of the style.
Overrides
TableFormat
Gets or sets the table format.
Property Value
The table format.
Inherited Properties
Name | Gets or sets the name of the style. (Inherited from Style) |
Inherited Methods
CreateStyle(StyleTemplateType, DocumentModel) | Creates one of the predefined styles. (Inherited from Style) |
ToString() | Returns a System.String that represents this Style instance. (Inherited from Style) |