ClassStylesheet
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:
public class Stylesheet
Inheritance: objectStylesheet
Constructors
Stylesheet()
Declaration
public Stylesheet()
Properties
ListStyles
Gets the collection of list styles defined in the stylesheet.
Lists
Gets the collection of lists defined in the stylesheet.
Declaration
[XamlCompositePropertySerializable]
public List<ListSerializationData> Lists { get; set; }
Property Value
Styles
Gets the collection of styles defined in the stylesheet.
Declaration
[XamlCompositePropertySerializable]
public List<StyleDefinition> Styles { get; set; }
Property Value
Methods
ApplyStylesheetToDocument(RadDocument)
Copies all styles, list styles and other stylesheet data to the specified Document
Declaration
public void ApplyStylesheetToDocument(RadDocument document)
Parameters
document
ApplyStylesheetToRichTextBox(RadRichTextBox)
Suspends layout updates of RadRichtextBox, which has better performance and uses ApplyStylesheetToDocument(RadDocument) to apply the stylesheet.
Declaration
public void ApplyStylesheetToRichTextBox(RadRichTextBox richTextBox)
Parameters
richTextBox
CopyStylesFromDocument(RadDocument, Func<StyleDefinition, bool>)
Declaration
protected virtual void CopyStylesFromDocument(RadDocument document, Func<StyleDefinition, bool> filter = null)
Parameters
document
filter
ExtractStylesheetFromDocument(RadDocument, bool)
Extracts the stylesheet from the specified RadDocument.
Declaration
public void ExtractStylesheetFromDocument(RadDocument document, bool customStylesOnly = false)
Parameters
document
The RadDocument from which to extract the stylesheet.
customStylesOnly
A boolean indicating whether to include default styles in the extraction.