Table of Contents

Class Styles

Namespace
MigraDoc.DocumentObjectModel
Assembly
MigraDoc.DocumentObjectModel.dll

Represents the collection of all styles.

public class Styles : DocumentObjectCollection
Inheritance
object
Styles
Inherited Members
Extension Methods

Constructors

Styles()

Initializes a new instance of the Styles class.

Properties

BuiltInStyles

Gets the built-in styles of MigraDoc. The collection is for reference only and must not be changed.

Comment

Gets or sets a comment associated with this object.

this[string?]

Gets a style by its name, or null if no such style exists. If name is null, null is returned.

Normal

Gets the default paragraph style.

Values

Gets the underlying internal nullable values for the properties of this document object.

Methods

Add(DocumentObject?)

Adds a DocumentObject to the styles collection. Will sometimes add a clone of the DocumentObject, not the object passed as parameter.

AddStyle(string, string)

Adds a new style to the styles collection.

Clone()

Creates a deep copy of this object.

GetIndex(string)

Gets the index of a style by name.