New to Telerik UI for WinForms? Start a free 30-day trial

Maps conditional table regions to the styles that format them.

Definition

Namespace:Telerik.WinForms.Documents.Model.Styles

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class ConditionalTableStylesCollection : INotifyCollectionChanged, IEnumerable

Inheritance: objectConditionalTableStylesCollection

Implements: IEnumerableINotifyCollectionChanged

Constructors

Creates a collection owned by the specified table style.

C#
public ConditionalTableStylesCollection(StyleDefinition style)
Parameters:styleStyleDefinition

The style definition that owns the conditional styles.

Properties

Gets the number of conditional styles in the collection.

C#
public int Count { get; }

Gets the table regions that currently have conditional styles.

C#
public ICollection<ConditionalTableStyleTypes> Keys { get; }

Gets the style assigned to the specified region, or null if none is assigned.

C#
public StyleDefinition this[ConditionalTableStyleTypes styleType] { get; }
Parameters:styleTypeConditionalTableStyleTypes

The region whose style to retrieve.

Methods

Adds or replaces the style assigned to a region. Adding the first row- or column-banding style sets the corresponding band size to 1 when it is currently 0.

C#
public void Add(ConditionalTableStyleTypes styleType, StyleDefinition style)
Parameters:styleTypeConditionalTableStyleTypes

The region to format.

styleStyleDefinition

The style that supplies the formatting.

Removes all conditional styles from the collection.

C#
public void Clear()

Gets whether the collection contains the specified region and style pair.

C#
public bool Contains(KeyValuePair<ConditionalTableStyleTypes, StyleDefinition> keyValuePair)
Parameters:keyValuePairKeyValuePair<ConditionalTableStyleTypes, StyleDefinition>

The region and style pair to check.

Returns:

bool

true if both the region and its associated style match; otherwise, false.

Gets whether a style is assigned to the specified region.

C#
public bool ContainsKey(ConditionalTableStyleTypes styleType)
Parameters:styleTypeConditionalTableStyleTypes

The region to check.

Returns:

bool

true if a style is assigned; otherwise, false.

Gets the style assigned to a region, or null if no style is assigned.

C#
public StyleDefinition GetValueOrNull(ConditionalTableStyleTypes styleType)
Parameters:styleTypeConditionalTableStyleTypes

The region to look up.

Returns:

StyleDefinition

The associated style, or null when the region has no style.

Raises the CollectionChanged event.

C#
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters:argsNotifyCollectionChangedEventArgs

The change description to send to event subscribers.

Removes the style assigned to a region, if one is present.

C#
public void Remove(ConditionalTableStyleTypes styleType)
Parameters:styleTypeConditionalTableStyleTypes

The region whose conditional style should be removed.

Events

Occurs when a conditional style is added to or removed from the collection.

C#
public event NotifyCollectionChangedEventHandler CollectionChanged

Implements: INotifyCollectionChanged.CollectionChanged