You will get a move action when you call ObservableCollection<T>.Move(int, int)
.
You can probably assume the same behavior when you replace an item. However there is no Replace
method on ObservableCollection
. You have to use the index accessor instead.
These action types should always be handled by INotifyCollectionChanged
consumers. They are available as a hint to prevent extra operations.
Consider if you had an expensive graphical representation of a collection and you called Remove
followed by Insert
. The collection shrinks by one element, then immediately grows by one element. This could potentially cause two redraw of all elements after the removed index. Replace and Move let the consumers know that the size of the collection has not changed.