Style Class
Represents a style.
- Inheritance:
- System.ObjectStyle
- Derived
Remarks
Style is a base class for ParagraphStyle, CharacterStyle and ListStyle.
All document styles are contained in a Styles collection.
To create one of the predefined styles, use CreateStyle(StyleTemplateType, DocumentModel) static method.
For more information see formats and styles.
Properties
BaseStyle
Gets or sets the style on which this style is based.
Property Value
The base style.
Document
Gets the owner document.
public abstract DocumentModel Document { get; protected set; }
Public MustOverride Property Document As DocumentModel
Property Value
The owner document.
Name
Gets or sets the name of the style.
Property Value
- System.String
The name.
StyleType
Gets the type of the style.
public abstract StyleType StyleType { get; }
Public MustOverride ReadOnly Property StyleType As StyleType
Property Value
The type of the style.
Methods
CreateStyle(StyleTemplateType, DocumentModel)
Creates one of the predefined styles.
public static Style CreateStyle(StyleTemplateType templateType, DocumentModel document)
Public Shared Function CreateStyle(templateType As StyleTemplateType, document As DocumentModel) As Style
Parameters
templateType
- StyleTemplateType
Type that determines predefined style.
document
- DocumentModel
The owner document.
Returns
Predefined style.
ToString()
Returns a System.String that represents this Style instance.
Returns
- System.String
A System.String that represents this Style instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).