StyleCollection
Class
Represents a collection of styles that can be applied to document elements.
Definition
Namespace:Telerik.Windows.Documents.Model
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
C#
public class StyleCollection : INotifyCollectionChanged, IEnumerable<StyleDefinition>, IEnumerable
Inheritance: objectStyleCollection
Implements:
Constructors
Properties
Gets the associated RadDocument.
C#
public RadDocument Document { get; }
Methods
Adds a new style definition to the collection.
C#
public void Add(StyleDefinition style)
The style definition to be added to the collection.
Removes all styles from the collection.
C#
public void Clear()
Remarks:
This method clears the collection of any previously added styles, leaving it empty. Use this method when you want to reset the style collection.
C#
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Removes a style from the collection by its name.
Removes a specified style definition from the style collection.
C#
public void Remove(StyleDefinition style)
The style definition to be removed from the collection.
Events
C#
public event NotifyCollectionChangedEventHandler CollectionChanged
Implements: