Style
Overview
Style is a class in Aspose.Words FOSS for .NET.
Inherits from: IParaAttrSource, IRunAttrSource.
Represents a single built-in or user-defined style.
This class provides 2 methods for working with Style objects in .NET programs.
Available methods include: Equals, Remove.
All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package.
Properties: Aliases, AutomaticallyUpdate, BaseStyleName, BuiltIn, Document, Font, and 15 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Name | string | Read/Write | Gets or sets the name of the style. |
StyleIdentifier | StyleIdentifier | Read | Gets the locale independent style identifier for a built-in style. |
Aliases | string[] | Read | Gets all aliases of this style. |
IsHeading | bool | Read | True when the style is one of the built-in Heading styles. |
Type | StyleType | Read | Gets the style type (paragraph or character). |
Document | DocumentBase | Read | Gets the owner document. |
LinkedStyleName | string | Read/Write | Gets/sets the name of the Style linked to this one. |
BaseStyleName | string | Read/Write | Gets/sets the name of the style this style is based on. |
NextParagraphStyleName | string | Read/Write | Gets/sets the name of the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style. |
BuiltIn | bool | Read | True if this style is one of the built-in styles in MS Word. |
Font | Font | Read | Gets the character formatting of the style. |
ParagraphFormat | ParagraphFormat | Read | Gets the paragraph formatting of the style. |
SemiHidden | bool | Read/Write | Gets/sets whether the style hides from the Styles gallery and from the Styles task pane. |
UnhideWhenUsed | bool | Read/Write | Gets/sets whether the style used in the current document unhides from the Styles gallery and from the Styles task pane. |
Priority | int | Read/Write | Gets/sets the integer value that represents the priority for sorting the styles in the Styles task pane. |
List | List | Read | Gets the list that defines formatting of this list style. |
ListFormat | ListFormat | Read | Provides access to the list formatting properties of a paragraph style. |
IsQuickStyle | bool | Read/Write | Specifies whether this style is shown in the Quick Style gallery inside MS Word UI. |
AutomaticallyUpdate | bool | Read/Write | Specifies whether this style is automatically redefined based on the appropriate value. |
Locked | bool | Read/Write | Specifies whether this style is locked. |
Styles | StyleCollection | Read | Gets the collection of styles this style belongs to. |
Methods
| Signature | Description |
|---|---|
Remove() | Removes the specified style from the document. |
Equals(style: Style) | Compares with the specified style. |