Click or drag to resize
CharacterStyle Class
Represents a style which can be applied to a Run, Hyperlink or Field elements.
Inheritance Hierarchy

Namespace:  GemBox.Document
Assembly:  GemBox.Document (in GemBox.Document.dll) Version: 25.3.30.1243
Syntax
public sealed class CharacterStyle : Style

The CharacterStyle type exposes the following members.

Constructors
  NameDescription
Public methodCharacterStyle
Initializes a new instance of the CharacterStyle class with specified name.
Top
Properties
  NameDescription
Public propertyBaseStyle
Gets or sets the style on which this style is based.
Public propertyCharacterFormat
Gets or sets the character format which shall be applied to the referencing Run.
Public propertyDocument
Gets the owner document.
(Overrides StyleDocument.)
Public propertyName
Gets or sets the name of the style.
(Inherited from Style.)
Public propertyStyleType
Gets the type of the style.
(Overrides StyleStyleType.)
Top
Methods
  NameDescription
Public methodToString
Returns a String that represents this Style instance.
(Inherited from Style.)
Top
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 CharacterFormat.Style property on a Run.CharacterFormat.

For an example how to apply CharacterStyle to a Run, see styles sample.

For more information about formattings and styles in GemBox.Document, see formattings and styles samples.

See Also