Provides an ObservableCollection<T> that is capable of suspending its property change notifications until a bulk update is complete.
- Type Parameters:
-
T
-The type of items.
- Inheritance:
-
object
Collection<T>
Observable
Collection <T> object
- Derived:
-
DeferrableObservableItemCollection<T>
DockingWindowCollectionBase<T>
Xml
Auto XmlHide Tab Strip Collection Docking XmlObject Collection Document XmlWindow Collection Rafting XmlHost Collection Tool XmlWindow Collection Tool ToolWindow Container Collection Window MicroContainer Collection Qualitative MicroRange Collection XYRange MicroCollection XYSeries XmlCollection Navigation GroupPane Collection Variant RibbonControlCollection<T> DocumentCollection Reference LogicalChildrenCollection<T> TintCollection Group Collection
Constructors
DeferrableObservableCollection()
Initializes a new instance of the DeferrableObservableCollection<T> class.
DeferrableObservableCollection(IComparer<T>)
Initializes a new instance of the DeferrableObservableCollection<T> class.
Parameter | Type | Description |
---|---|---|
sortComparer | IComparer<T> | A comparer used to sort items; otherwise |
DeferrableObservableCollection(IComparer<T>, bool)
Initializes a new instance of the DeferrableObservableCollection<T> class.
Parameter | Type | Description |
---|---|---|
sortComparer | IComparer<T> | A comparer used to sort items; otherwise |
useStableSort | bool | if set to |
Properties
IsDirty
Gets whether there are any suspended property changes.
Property Value
- bool:
true
if there are any suspended property changes; otherwise,false
.
IsPropertyChangeSuspended
Gets whether property change notifications are currently suspended.
Property Value
- bool:
true
if property change notifications are currently suspended; otherwise,false
.
Methods
AddRange(IEnumerable<T>)
Adds multiple items to the collection.
Parameter | Type | Description |
---|---|---|
items | IEnumerable<T> | The collection of items to add. |
BeginUpdate()
Flags that a bulk update is about to begin.
EndUpdate()
Flags that a bulk update has ended.
InsertItem(int, T)
Inserts an item into the collection at the specified index.
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index at which |
item | T | The object to insert. |
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Raises the CollectionChanged
event with the provided arguments.
Parameter | Type | Description |
---|---|---|
e | Notify |
A Notify |
OnPropertyChanged(PropertyChangedEventArgs)
Raises the PropertyChanged
event with the provided arguments.
Parameter | Type | Description |
---|---|---|
e | Property |
A Property |
SetItem(int, T)
Replaces the element at the specified index.
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index of the element to replace. |
item | T | The new value for the element at the specified index. |
ToArray()
Returns a strongly-typed array containing the items in this collection.
Returns
- T[]:
A strongly-typed array containing the items in this collection.
Inherited Members
-
object.
Get Type() -
object.
Memberwise Clone() -
object.
To String() -
object.
Equals(object) -
object.
Equals(object, object) -
object.
Reference Equals(object, object) -
object.
Get Hash Code()