Class
StyleCollection

Definition

Namespace:Telerik.WinForms.Documents.Model

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

cs-api-definition
public class StyleCollection : INotifyCollectionChanged, IEnumerable

Inheritance: objectStyleCollection

Implements: IEnumerableINotifyCollectionChanged

Constructors

StyleCollection(RadDocument)

Declaration

cs-api-definition
public StyleCollection(RadDocument document)

Parameters

document

RadDocument

Properties

Count

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

Document

Declaration

cs-api-definition
public RadDocument Document { get; }

Property Value

RadDocument

this[string]

Declaration

cs-api-definition
public StyleDefinition this[string styleName] { get; }

Parameters

styleName

string

Property Value

StyleDefinition

Methods

Add(StyleDefinition)

Declaration

cs-api-definition
public void Add(StyleDefinition style)

Parameters

style

StyleDefinition

Clear()

Declaration

cs-api-definition
public void Clear()

GetValueOrNull(string, bool)

Get style from the repository by name.

Declaration

cs-api-definition
public StyleDefinition GetValueOrNull(string styleName, bool autoAddBuiltInStyles = true)

Parameters

styleName

string

Name of the style.

autoAddBuiltInStyles

bool

True to automatically add built in styles into the repository.

Returns

StyleDefinition

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Declaration

cs-api-definition
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)

Parameters

args

NotifyCollectionChangedEventArgs

Remove(StyleDefinition)

Declaration

cs-api-definition
public void Remove(StyleDefinition style)

Parameters

style

StyleDefinition

Remove(string)

Declaration

cs-api-definition
public void Remove(string name)

Parameters

name

string

Events

CollectionChanged

Declaration

cs-api-definition
public event NotifyCollectionChangedEventHandler CollectionChanged

Event Value

NotifyCollectionChangedEventHandler

Implements INotifyCollectionChanged.CollectionChanged