Class Style
Defines a named set of formatting properties that can be reused across multiple document elements with inheritance support.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Flow.Model.Styles
Assembly: Telerik.Windows.Documents.Flow.dll
Syntax
public class Style
Constructors
Style(String, StyleType)
Creates a new style with the specified identifier and type.
Declaration
public Style(string id, StyleType type)
Parameters
|
System.String
id
The ID. |
|
StyleType
type
The type. |
Properties
BasedOnStyleId
Gets or sets the style ID from which this style inherits formatting properties.
Declaration
public string BasedOnStyleId { get; set; }
Property Value
|
System.String
The name of the based on. |
CharacterProperties
Gets the character formatting properties applied by this style to text runs.
Declaration
public CharacterProperties CharacterProperties { get; }
Property Value
|
CharacterProperties
The character properties. |
Document
Gets the document that owns this style, or null if the style has not been added to a document.
Declaration
public RadFlowDocument Document { get; }
Property Value
|
RadFlowDocument
The document. |
Id
Gets or sets the unique identifier for this style; cannot be changed once the style is added to a document.
Declaration
public string Id { get; set; }
Property Value
|
System.String
The ID. |
IsCustom
Gets or sets whether this style is user-defined rather than built-in; defaults to false. The default value is
false.
Declaration
public bool IsCustom { get; set; }
Property Value
|
System.Boolean
|
IsDefault
Gets or sets whether this style serves as the default for its type; cannot be changed once added to a document.
Declaration
public bool IsDefault { get; set; }
Property Value
|
System.Boolean
The is default. |
IsPrimary
Gets or sets whether this style appears in the primary styles gallery in UI.
Declaration
public bool IsPrimary { get; set; }
Property Value
|
System.Boolean
|
LinkedStyleId
Gets or sets the linked style ID that pairs this paragraph style with a character style or vice versa.
This property can be set to Paragraph or Character style only. Paragraph style can be linked only to Character style and vice versa.
Declaration
public string LinkedStyleId { get; set; }
Property Value
|
System.String
The linked style ID. |
Name
Gets or sets the display name shown in UI; defaults to the style ID if not explicitly set.
Declaration
public string Name { get; set; }
Property Value
|
System.String
The name. |
NextStyleId
Gets or sets the style ID automatically applied to the next paragraph after pressing Enter.
Declaration
public string NextStyleId { get; set; }
Property Value
|
System.String
The next style id. |
ParagraphProperties
Gets the paragraph formatting properties applied by this style to paragraphs.
Declaration
public ParagraphProperties ParagraphProperties { get; }
Property Value
|
ParagraphProperties
The paragraph properties. |
StyleType
Gets the category of document elements to which this style applies.
Declaration
public StyleType StyleType { get; }
Property Value
|
StyleType
The type of the style. |
TableCellProperties
Gets the table cell formatting properties; only populated for table styles.
Declaration
public TableCellProperties TableCellProperties { get; }
Property Value
|
TableCellProperties
The table cell properties. |
TableProperties
Gets the table formatting properties; only populated for table styles.
Declaration
public TableProperties TableProperties { get; }
Property Value
|
TableProperties
The table properties. |
TableRowProperties
Gets the table row formatting properties; only populated for table styles.
Declaration
public TableRowProperties TableRowProperties { get; }
Property Value
|
TableRowProperties
The table row properties. |
UIPriority
Gets or sets the sort order priority for displaying this style in UI lists; lower values appear first.
Declaration
public int UIPriority { get; set; }
Property Value
|
System.Int32
The UI priority. |
Methods
Clone()
Creates a deep copy of this style with all properties and settings preserved.
Declaration
public Style Clone()
Returns
|
Style
The cloned style. |
GetPropertyValue(IStylePropertyDefinition)
Retrieves the resolved value of a style property by evaluating the inheritance chain.
Declaration
public object GetPropertyValue(IStylePropertyDefinition stylePropertyDefinition)
Parameters
|
IStylePropertyDefinition
stylePropertyDefinition
The style property definition. |
Returns
|
System.Object
|