CharacterStyle Class
public sealed class CharacterStyle : Style
Public NotInheritable Class CharacterStyle
Inherits Style
- Inheritance:
- System.ObjectCharacterStyle
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 CharacterStyle to a Run, set it to a Style property on a CharacterFormat.
For an example how to apply CharacterStyle to a Run, see styles example.
Constructors
CharacterStyle(String)
Initializes a new instance of the CharacterStyle class with specified name.
Parameters
name
- System.String
The character style name.
Properties
BaseStyle
Gets or sets the style on which this style is based.
Property Value
The base style.
CharacterFormat
Gets or sets the character format which shall be applied to the referencing Run.
public CharacterFormat CharacterFormat { get; set; }
Public Property CharacterFormat As CharacterFormat
Property Value
The character format which shall be applied to the referencing Run.
Remarks
For more information about paragraph formatting, see character formatting 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
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
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) |