Class
ReadOnlyObservableCollection<T>

Represents a read-only wrapper around an ObservableCollection that provides change notifications.

Definition

Namespace:Telerik.WinControls.Data

Assembly:Telerik.WinControls.dll

Type Parameters:

T

The type of elements in the collection.

Syntax:

cs-api-definition
public class ReadOnlyObservableCollection<T> : ReadOnlyCollection<T>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged

Inheritance: objectReadOnlyCollection<T>ReadOnlyObservableCollection<T>

Derived Classes: GridViewSelectedCellsCollectionGridViewSelectedRowsCollectionFieldCollection

Implements: ICollectionIEnumerableIListINotifyCollectionChangedINotifyPropertyChanged

Inherited Members ReadOnlyCollection<T>.Contains(T)ReadOnlyCollection<T>.CopyTo(T[], int)ReadOnlyCollection<T>.GetEnumerator()ReadOnlyCollection<T>.IndexOf(T)ReadOnlyCollection<T>.CountReadOnlyCollection<T>.this[int]ReadOnlyCollection<T>.Items

Constructors

ReadOnlyObservableCollection(ObservableCollection<T>)

Initializes a new instance of the ReadOnlyObservableCollection<T> class with the specified observable collection.

Declaration

cs-api-definition
public ReadOnlyObservableCollection(ObservableCollection<T> list)

Parameters

list

ObservableCollection<T>

The ObservableCollection to wrap as read-only.

Methods

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Fires the CollectionChanged event when the underlying collection changes.

Declaration

cs-api-definition
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)

Parameters

args

NotifyCollectionChangedEventArgs

The event arguments describing the collection change.

OnPropertyChanged(PropertyChangedEventArgs)

Fires the PropertyChanged event when a property of the underlying collection changes.

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)

Parameters

args

PropertyChangedEventArgs

The event arguments describing the property change.

Events

CollectionChanged

Occurs when an item is added, removed, changed, moved, or the entire list is refreshed.

Declaration

cs-api-definition
protected event NotifyCollectionChangedEventHandler CollectionChanged

Event Value

NotifyCollectionChangedEventHandler

PropertyChanged

Occurs when when a property of an object changes change. Calling the event is developer's responsibility.

Declaration

cs-api-definition
protected event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler