Class
BaseCollection<T>

An observable collection which splits the CollectionChanged event into separate events.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Type Parameters:

T

The type on which the collection is based.

Syntax:

cs-api-definition
public class BaseCollection<T> : ObservableCollection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged

Inheritance: objectCollection<T>ObservableCollection<T>BaseCollection<T>

Implements: ICollectionICollection<T>IEnumerableIEnumerable<T>IListIList<T>INotifyCollectionChangedINotifyPropertyChangedIReadOnlyCollection<T>IReadOnlyList<T>

Inherited Members ObservableCollection<T>.Move(int, int)ObservableCollection<T>.ClearItems()ObservableCollection<T>.RemoveItem(int)ObservableCollection<T>.InsertItem(int, T)ObservableCollection<T>.SetItem(int, T)ObservableCollection<T>.MoveItem(int, int)ObservableCollection<T>.OnPropertyChanged(PropertyChangedEventArgs)ObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs)ObservableCollection<T>.BlockReentrancy()ObservableCollection<T>.CheckReentrancy()ObservableCollection<T>.CollectionChangedObservableCollection<T>.PropertyChangedCollection<T>.CopyTo(T[], int)Collection<T>.Contains(T)Collection<T>.GetEnumerator()Collection<T>.IndexOf(T)Collection<T>.RemoveAt(int)Collection<T>.CountCollection<T>.ItemsCollection<T>.this[int]

Constructors

BaseCollection()

Initializes a new instance of the BaseCollection<T> class.

Declaration

cs-api-definition
public BaseCollection()

BaseCollection(IEnumerable<T>)

Initializes a new instance of the BaseCollection<T> class. Initializes a new instance of the BaseCollection<T> class.

Declaration

cs-api-definition
public BaseCollection(IEnumerable<T> collection)

Parameters

collection

IEnumerable<T>

The collection.

BaseCollection(bool)

Initializes a new instance of the BaseCollection<T> class.

Declaration

cs-api-definition
public BaseCollection(bool raiseEventsByDefault)

Parameters

raiseEventsByDefault

bool

The raise events by default.

Methods

Add(T)

Adds an item to the collection.

Declaration

cs-api-definition
public void Add(T item)

Parameters

item

T

The item to be added.

Add(T, bool)

Adds and new item to the collection and specifies whether to raise the ItemAdded event.

Declaration

cs-api-definition
public void Add(T item, bool raise)

Parameters

item

T

The item to add to the collection.

raise

bool

Whether to raise the ItemAdded event.

Clear()

Clears this collection.

Declaration

cs-api-definition
public void Clear()

Clear(bool)

Clears this collection.

Declaration

cs-api-definition
public void Clear(bool raise)

Parameters

raise

bool

Whether to raise the Cleared event.

Insert(int, T)

Inserts an item to this collection.

Declaration

cs-api-definition
public void Insert(int index, T item)

Parameters

index

int

The index at which the item should be inserted.

item

T

The item to insert.

Insert(int, T, bool)

Inserts an item to this collection.

Declaration

cs-api-definition
public void Insert(int index, T item, bool raise)

Parameters

index

int

The index at which the item should be inserted.

item

T

The item to insert.

raise

bool

Whether to raise the ItemInserted event.

Remove(T)

Removes an item from this collection.

Declaration

cs-api-definition
public void Remove(T item)

Parameters

item

T

The item to remove.

Remove(T, bool)

Removes an item from this collection.

Declaration

cs-api-definition
public void Remove(T item, bool raise)

Parameters

item

T

The item to remove.

raise

bool

Whether to raise the ItemRemoved event.

Events

Cleared

Occurs when the collection is cleared.

Declaration

cs-api-definition
public event EventHandler Cleared

Event Value

EventHandler

ItemAdded

Occurs when an item is added.

Declaration

cs-api-definition
public event EventHandler<GenericEventArgs<T>> ItemAdded

Event Value

EventHandler<GenericEventArgs<T>>

ItemInserted

Occurs when an item is inserted.

Declaration

cs-api-definition
public event EventHandler<GenericEventArgs<T>> ItemInserted

Event Value

EventHandler<GenericEventArgs<T>>

ItemRemoved

Occurs when an item is removed.

Declaration

cs-api-definition
public event EventHandler<GenericEventArgs<T>> ItemRemoved

Event Value

EventHandler<GenericEventArgs<T>>