GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    CharacterStyle Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a style which can be applied to a Run, Hyperlink or Field elements.

    • C#
    • VB.NET
    public sealed class CharacterStyle : Style
    Public NotInheritable Class CharacterStyle
        Inherits Style
    Inheritance:
    System.Object
    Style
    CharacterStyle
    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.

    • C#
    • VB.NET
    public CharacterStyle(string name)
    Public Sub New(name As String)
    Parameters
    name
    System.String

    The character style name.

    Properties

    BaseStyle

    Gets or sets the style on which this style is based.

    • C#
    • VB.NET
    public CharacterStyle BaseStyle { get; set; }
    Public Property BaseStyle As CharacterStyle
    Property Value
    CharacterStyle

    The base style.

    CharacterFormat

    Gets or sets the character format which shall be applied to the referencing Run.

    • C#
    • VB.NET
    public CharacterFormat CharacterFormat { get; set; }
    Public Property CharacterFormat As CharacterFormat
    Property Value
    CharacterFormat

    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.

    • C#
    • VB.NET
    public override DocumentModel Document { get; protected set; }
    Public Overrides Property Document As DocumentModel
    Property Value
    DocumentModel

    The owner document.

    Overrides
    Style.Document

    StyleType

    Gets the type of the style.

    • C#
    • VB.NET
    public override StyleType StyleType { get; }
    Public Overrides ReadOnly Property StyleType As StyleType
    Property Value
    StyleType

    The type of the style.

    Overrides
    Style.StyleType

    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)

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.