Class
CellStyleCollection

Represents cell style collection.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.PropertySystem

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class CellStyleCollection : IEnumerable

Inheritance: objectCellStyleCollection

Implements: IEnumerable

Properties

Count

Gets the count of the styles.

Declaration

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

Property Value

int

The count of the styles.

Workbook

Gets the workbook.

Declaration

cs-api-definition
public Workbook Workbook { get; }

Property Value

Workbook

The workbook.

this[string]

Gets the CellStyle with the specified style name.

Declaration

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

Parameters

styleName

string

The name of the desired style.

Property Value

CellStyle

The style.

Methods

Add(string, CellStyleCategory, bool)

Adds the specified style.

Declaration

cs-api-definition
public CellStyle Add(string styleName, CellStyleCategory category = CellStyleCategory.Custom, bool isRemovable = true)

Parameters

styleName

string

Name of the style.

category

CellStyleCategory

The category.

isRemovable

bool

A value indicating if the style can be removed later.

Returns

CellStyle

The style.

Contains(CellStyle)

Determines whether the specified style is contained.

Declaration

cs-api-definition
public bool Contains(CellStyle style)

Parameters

style

CellStyle

The style.

Returns

bool

True if is contained.

Contains(string)

Determines whether the style with the specified name is contained.

Declaration

cs-api-definition
public bool Contains(string styleName)

Parameters

styleName

string

Name of the style.

Returns

bool

True if is contained.

GetByName(string)

Gets the style by name.

Declaration

cs-api-definition
public CellStyle GetByName(string styleName)

Parameters

styleName

string

Name of the style.

Returns

CellStyle

The style.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration

cs-api-definition
public IEnumerator<CellStyle> GetEnumerator()

Returns

IEnumerator<CellStyle>

A IEnumerator<T> that can be used to iterate through the collection.

OnChanged()

Called when the collection is changed.

Declaration

cs-api-definition
protected virtual void OnChanged()

Remove(CellStyle)

Removes the specified style.

Declaration

cs-api-definition
public bool Remove(CellStyle style)

Parameters

style

CellStyle

The style.

Returns

bool

True if succeed.

Remove(string)

Removes the specified style by name.

Declaration

cs-api-definition
public bool Remove(string styleName)

Parameters

styleName

string

Name of the style.

Returns

bool

True if succeed.

Events

Changed

Occurs when the collection is changed.

Declaration

cs-api-definition
public event EventHandler Changed

Event Value

EventHandler