Class
Stylesheet

Represents a collection of styles that can be applied to document elements.

Definition

Namespace:Telerik.Windows.Documents.Model.Styles

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class Stylesheet

Inheritance: objectStylesheet

Constructors

Stylesheet()

Declaration

cs-api-definition
public Stylesheet()

Properties

ListStyles

Gets the collection of list styles defined in the stylesheet.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public List<ListStyle> ListStyles { get; set; }

Property Value

List<ListStyle>

Lists

Gets the collection of lists defined in the stylesheet.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public List<ListSerializationData> Lists { get; set; }

Property Value

List<ListSerializationData>

Styles

Gets the collection of styles defined in the stylesheet.

Declaration

cs-api-definition
[XamlCompositePropertySerializable]
public List<StyleDefinition> Styles { get; set; }

Property Value

List<StyleDefinition>

Version

Gets the version of the stylesheet.

Declaration

cs-api-definition
[XamlSerializable]
public string Version { get; set; }

Property Value

string

Methods

ApplyStylesheetToDocument(RadDocument)

Copies all styles, list styles and other stylesheet data to the specified Document

Declaration

cs-api-definition
public void ApplyStylesheetToDocument(RadDocument document)

Parameters

document

RadDocument

ApplyStylesheetToRichTextBox(RadRichTextBox)

Suspends layout updates of RadRichtextBox, which has better performance and uses ApplyStylesheetToDocument(RadDocument) to apply the stylesheet.

Declaration

cs-api-definition
public void ApplyStylesheetToRichTextBox(RadRichTextBox richTextBox)

Parameters

richTextBox

RadRichTextBox

CopyStylesFromDocument(RadDocument, Func<StyleDefinition, bool>)

Declaration

cs-api-definition
protected virtual void CopyStylesFromDocument(RadDocument document, Func<StyleDefinition, bool> filter = null)

Parameters

document

RadDocument

filter

Func<StyleDefinition, bool>

ExtractStylesheetFromDocument(RadDocument, bool)

Extracts the stylesheet from the specified RadDocument.

Declaration

cs-api-definition
public void ExtractStylesheetFromDocument(RadDocument document, bool customStylesOnly = false)

Parameters

document

RadDocument

The RadDocument from which to extract the stylesheet.

customStylesOnly

bool

A boolean indicating whether to include default styles in the extraction.