[]
Represents a collection of built-in and user-defined styles in a document.
public class StyleCollection : IReadOnlyList<Style>, IReadOnlyCollection<Style>, IEnumerable<Style>, IEnumerable
Public Class StyleCollection
Implements IReadOnlyList(Of Style), IReadOnlyCollection(Of Style), IEnumerable(Of Style), IEnumerable
Name | Description |
---|---|
Count | Gets the number of styles in the collection. |
DefaultFont | Gets document default text formatting. |
DefaultParagraphFormat | Gets document default paragraph formatting. |
DefaultTabStop | Gets or sets the interval (in points) between the default tab stops. |
Document | Gets the parent document. |
this[BuiltInStyleId] | Gets a built-in style by its locale independent identifier. |
this[int] | Gets a style by its index. |
this[string] | Gets a style by name or alias. |
Name | Description |
---|---|
Add(string, Style) | Creates a new user defined style and adds it to the document. |
Add(string, StyleType) | Creates a new user defined style and adds it to the document. |
AddLinkedStyle(string, Style) | Adds a pair of linked paragraph and character styles to the collection. |
Contains(string) | Checks whether this collection contains a style with a specified name. |
GetDefaultStyle(StyleType) | Gets the style that is applied to objects that do not explicitly specify a style. |
SetDefaultStyle(StyleType, Style) | Sets the style that is applied to objects that do not explicitly specify a style. |
TryGetValue(string, out Style) | Tries to get a style from the collection by its name. |