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

Definition

Namespace:Telerik.WinForms.Documents.Model

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class StyleCollection : INotifyCollectionChanged, IEnumerable

Inheritance: objectStyleCollection

Implements: IEnumerableINotifyCollectionChanged

Constructors

C#
public StyleCollection(RadDocument document)
Parameters:documentRadDocument

Properties

C#
public int Count { get; }
C#
public RadDocument Document { get; }
C#
public StyleDefinition this[string styleName] { get; }
Parameters:styleNamestring

Methods

C#
public void Add(StyleDefinition style)
Parameters:styleStyleDefinition
C#
public void Clear()

Get style from the repository by name.

C#
public StyleDefinition GetValueOrNull(string styleName, bool autoAddBuiltInStyles = true)
Parameters:styleNamestring

Name of the style.

autoAddBuiltInStylesbool

True to automatically add built in styles into the repository.

Returns:

StyleDefinition

C#
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters:argsNotifyCollectionChangedEventArgs
C#
public void Remove(string name)
Parameters:namestring
C#
public void Remove(StyleDefinition style)
Parameters:styleStyleDefinition

Events

C#
public event NotifyCollectionChangedEventHandler CollectionChanged

Implements: INotifyCollectionChanged.CollectionChanged