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

    Show / Hide Table of Contents

    Style Class

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

    Represents a style.

    • C#
    • VB.NET
    public abstract class Style
    Public MustInherit Class Style
    Inheritance:
    System.Object
    Style
    Derived
    CharacterStyle
    ListStyle
    ParagraphStyle
    TableStyle
    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.

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

    The base style.

    Document

    Gets the owner document.

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

    The owner document.

    Name

    Gets or sets the name of the style.

    • C#
    • VB.NET
    public string Name { get; set; }
    Public Property Name As String
    Property Value
    System.String

    The name.

    StyleType

    Gets the type of the style.

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

    The type of the style.

    Methods

    CreateStyle(StyleTemplateType, DocumentModel)

    Creates one of the predefined styles.

    • C#
    • VB.NET
    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
    Style

    Predefined style.

    ToString()

    Returns a System.String that represents this Style instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this Style instance.

    Overrides
    System.Object.ToString()
    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).

    Examples

    Styles example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.