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

Represents a collection that provides notifications when items are added, removed, or when individual items' properties change.

This collection extends NotifyCollection by automatically subscribing to PropertyChanged events of individual items. When an item's property changes, the collection raises a CollectionChanged event with ItemChanged action.

Definition

Namespace:Telerik.Collections.Generic

Assembly:Telerik.WinControls.dll

Type Parameters:

T

The type of elements in the collection. Must implement INotifyPropertyChanged.

Syntax:

C#
public class ItemNotifyCollection<T> : NotifyCollection<T>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged where T : INotifyPropertyChanged

Inheritance: objectCollection<T>NotifyCollection<T>ItemNotifyCollection<T>

Implements: ICollectionIEnumerableIListINotifyCollectionChangedINotifyPropertyChanged

Inherited Members NotifyCollection<T>.EmptyNotifyCollection<T>.Move(int, int)NotifyCollection<T>.AddRange(params T[])NotifyCollection<T>.AddRange(IEnumerable<T>)NotifyCollection<T>.BeginUpdate()NotifyCollection<T>.EndUpdate()NotifyCollection<T>.EndUpdate(bool)NotifyCollection<T>.DeferRefresh()NotifyCollection<T>.MoveItem(int, int)NotifyCollection<T>.CreateEventArguments(NotifyCollectionChangedAction)NotifyCollection<T>.CreateEventArguments(NotifyCollectionChangedAction, object, int)NotifyCollection<T>.CreateEventArguments(NotifyCollectionChangedAction, object, object, int)NotifyCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs)NotifyCollection<T>.OnPropertyChanged(PropertyChangedEventArgs)NotifyCollection<T>.OnPropertyChanged(string)NotifyCollection<T>.VersionNotifyCollection<T>.SuspendedNotifyCollection<T>.CollectionChangedNotifyCollection<T>.PropertyChangedCollection<T>.Add(T)Collection<T>.Clear()Collection<T>.CopyTo(T[], int)Collection<T>.Contains(T)Collection<T>.GetEnumerator()Collection<T>.IndexOf(T)Collection<T>.Insert(int, T)Collection<T>.Remove(T)Collection<T>.RemoveAt(int)Collection<T>.CountCollection<T>.ItemsCollection<T>.this[int]...

Constructors

C#
public ItemNotifyCollection()
C#
public ItemNotifyCollection(IList<T> list)
Parameters:listIList<T>

Methods

C#
protected override void ClearItems()

Overrides: NotifyCollection<T>.ClearItems()

C#
protected override void InsertItem(int index, T item)
Parameters:indexintitemT

Overrides: NotifyCollection<T>.InsertItem(int, T)

C#
protected override void RemoveItem(int index)
Parameters:indexint

Overrides: NotifyCollection<T>.RemoveItem(int)

C#
protected override void SetItem(int index, T item)
Parameters:indexintitemT

Overrides: NotifyCollection<T>.SetItem(int, T)

C#
protected virtual void SubscribeItem(T item)
Parameters:itemT
C#
protected virtual void UnsubscribeItem(T item)
Parameters:itemT