Class StyleCollection
Represents a StyleCollection.
Inherited Members
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public class StyleCollection : IEnumerable<Style>, IEnumerable
Properties
Count
Gets the number of styles in the collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
DefaultFont
Gets document default text formatting.
Declaration
public Font DefaultFont { get; }
Property Value
| Type | Description |
|---|---|
| Font |
DefaultParagraphFormat
Gets document default paragraph formatting.
Declaration
public ParagraphFormat DefaultParagraphFormat { get; }
Property Value
| Type | Description |
|---|---|
| ParagraphFormat |
Document
Gets or sets document.
Declaration
public DocumentBase Document { get; }
Property Value
| Type | Description |
|---|---|
| DocumentBase |
this[int]
Gets this[int].
Declaration
public Style this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type | Description |
|---|---|
| Style |
this[string]
Gets this[string].
Declaration
public Style this[string name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Property Value
| Type | Description |
|---|---|
| Style |
Methods
Add(CharacterStyleDefinition)
Registers a custom character style to be serialized to styles.xml.
Declaration
public void Add(CharacterStyleDefinition style)
Parameters
| Type | Name | Description |
|---|---|---|
| CharacterStyleDefinition | style |
Add(Style)
Adds the specified item to this collection.
Declaration
public void Add(Style style)
Parameters
| Type | Name | Description |
|---|---|---|
| Style | style | The style used by the operation. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<Style> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<Style> | The resulting value. |