Represents an ObservableCollection<T> that has ability to suspend change notification events.
Definition
Namespace:Telerik.Windows.Data
Assembly:Telerik.Windows.Data.dll
Type Parameters:
T
The type of the items in the collection.
Syntax:
public class RadObservableCollection<T> : ObservableCollection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, ISuspendNotifications
Inheritance: objectCollection<T>ObservableCollection<T>RadObservableCollection<T>
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadObservableCollection<T> class.
public RadObservableCollection()
Initializes a new instance of the RadObservableCollection<T> class.
public RadObservableCollection(IEnumerable<T> collection)
The collection from which the elements are copied.
Exceptions:The collection parameter cannot be null.
Properties
Gets the added items between suspend and resume.
protected virtual IList<T> AddedItems { get; }
The added items.
Gets or sets a value indicating whether change to the collection is made when its notifications are suspended.
protected bool IsDirty { get; set; }
true if this instance is has been changed while notifications are
suspended; otherwise, false.
Gets a value indicating whether change notifications are suspended.
public bool NotificationsSuspended { get; }
True if notifications are suspended, otherwise, false.
Implements:
Gets the removed items between suspend and resume.
protected virtual IList<T> RemovedItems { get; }
The removed items.
Get a value that indicates whether RadObservableCollection would raise CollectionChanged event with Reset action, when a bulk add/remove operation takes place.
public bool ShouldResetOnResumeNotifications { get; }
Methods
Adds the elements of the specified collection to the end of the ObservableCollection<T>.
public virtual void AddRange(IEnumerable<T> items)
The items that will be added.
Exceptions:items is null.
protected override void ClearItems()
Overrides:
Inserts the elements of the specified collection at the specified index.
public virtual void InsertRange(IEnumerable<T> items, int index)
The items that will be added.
indexintThe start index.
Exceptions:items is null.
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Overrides:
Raises the CollectionChanged event when notifications are not suspended.
Raises the event.
protected virtual void OnCollectionChanging(CollectionChangingEventArgs e)
The CollectionChangingEventArgs instance containing the event data.
protected override void OnPropertyChanged(PropertyChangedEventArgs e)
Overrides:
Raises the PropertyChanged event when notifications are not suspended.
Raises the CollectionChanged in accordance to the value of ShouldResetOnResumeNotifications and the presence of modified items.
protected virtual void RaiseCollectionChangedOnResume()
Removes the elements from the specified collection.
public virtual void RemoveRange(IEnumerable<T> items)
The items that will be removed.
Exceptions:items is null.
Raises CollectionChanged with Reset changed action.
public void Reset()
Resumes the notifications.
public virtual void ResumeNotifications()
Implements:
Suspends the notifications.
public virtual void SuspendNotifications()
Implements:
Events
Occurs when collection is changing.
public event EventHandler<CollectionChangingEventArgs> CollectionChanging
Occurs when a property value changes.
public event PropertyChangedEventHandler PropertyChanged