New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class Stylesheet

Inheritance: objectStylesheet

Constructors

C#
public Stylesheet()

Properties

Gets the collection of lists defined in the stylesheet.

C#
[XamlCompositePropertySerializable]
public List<ListSerializationData> Lists { get; set; }

Gets the collection of list styles defined in the stylesheet.

C#
[XamlCompositePropertySerializable]
public List<ListStyle> ListStyles { get; set; }

Gets the collection of styles defined in the stylesheet.

C#
[XamlCompositePropertySerializable]
public List<StyleDefinition> Styles { get; set; }

Gets the version of the stylesheet.

C#
[XamlSerializable]
public string Version { get; set; }

Methods

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

C#
public void ApplyStylesheetToDocument(RadDocument document)
Parameters:documentRadDocument

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

C#
public void ApplyStylesheetToRichTextBox(RadRichTextBox richTextBox)
Parameters:richTextBoxRadRichTextBox
C#
protected virtual void CopyStylesFromDocument(RadDocument document, Func<StyleDefinition, bool> filter = null)
Parameters:documentRadDocumentfilterFunc<StyleDefinition, bool>

Extracts the stylesheet from the specified RadDocument.

C#
public void ExtractStylesheetFromDocument(RadDocument document, bool customStylesOnly = false)
Parameters:documentRadDocument

The RadDocument from which to extract the stylesheet.

customStylesOnlybool

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