ClassBaseCollection<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:
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:
Inherited Members
Constructors
BaseCollection()
Initializes a new instance of the BaseCollection<T> class.
Declaration
public BaseCollection()
BaseCollection(IEnumerable<T>)
Initializes a new instance of the BaseCollection<T> class. Initializes a new instance of the BaseCollection<T> class.
Declaration
public BaseCollection(IEnumerable<T> collection)
Parameters
collection
IEnumerable<T>
The collection.
BaseCollection(bool)
Initializes a new instance of the BaseCollection<T> class.
Declaration
public BaseCollection(bool raiseEventsByDefault)
Parameters
raiseEventsByDefault
The raise events by default.
Methods
Add(T)
Adds an item to the collection.
Declaration
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.
Clear(bool)
Clears this collection.
Insert(int, T)
Inserts an item to this collection.
Declaration
public void Insert(int index, T item)
Parameters
index
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
public void Insert(int index, T item, bool raise)
Parameters
index
The index at which the item should be inserted.
item
T
The item to insert.
raise
Whether to raise the ItemInserted event.
Remove(T)
Removes an item from this collection.
Declaration
public void Remove(T item)
Parameters
item
T
The item to remove.
Remove(T, bool)
Removes an item from this collection.
Declaration
public void Remove(T item, bool raise)
Parameters
item
T
The item to remove.
raise
Whether to raise the ItemRemoved event.
Events
Cleared
Occurs when the collection is cleared.
ItemAdded
Occurs when an item is added.
Declaration
public event EventHandler<GenericEventArgs<T>> ItemAdded
Event Value
ItemInserted
Occurs when an item is inserted.
Declaration
public event EventHandler<GenericEventArgs<T>> ItemInserted
Event Value
ItemRemoved
Occurs when an item is removed.
Declaration
public event EventHandler<GenericEventArgs<T>> ItemRemoved
Event Value