Interface IDerivedStyle
Styles that derive from a base style.
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public interface IDerivedStyle
Treating the different Word style kinds through one common type runs through IDerivedStyle, the contract every concrete style in IronWord works through. It is what you hold when code handles paragraph, run, and table styles uniformly, reading each one's shared base and then applying overrides on the concrete type.
The concrete styles that implement it are ParagraphStyle, TextStyle, TableStyle, TableCellStyle, and TableRowStyle, so the interface is the common type across paragraph, run, and table styling. Its own member is BaseStyle, a get-only property typed as IBaseStyle that exposes the shared base a derived style reads its inherited values from. Because the property is read-only on the interface, you obtain the base through it rather than reassigning it; to apply a concrete style, work with the implementing type directly, such as setting a ParagraphStyle on a paragraph or a TableCellStyle on a cell.
The styled text how-to applies a style to text, and the document element tutorial shows where styles sit in the model.
Properties
BaseStyle
The original base style definition a style is based off of.
Declaration
IBaseStyle BaseStyle { get; }
Property Value
| Type | Description |
|---|---|
| IBaseStyle |