What are the potential problems caused by an ObservableCollection supporting operations like AddRange or RemoveRange? There must be a reason why Microsoft didn’t provide them, now that ObservableCollection is so frequently used with WPF.
You could implement your own collection that supports bulk operations and implements INotifyCollectionChanged. What happens if I bind such a control to an ItemsControl?
Does anyone know of ItemsControls that don’t support bulk changes?
I don’t think it’s that there are any potential downsides or problems, it’s just that it isn’t there. In fact, you will find that most types in ‘System.Collections.Generic’ don’t supply ‘AddRange’ functionality either.
Meanwhile, lots of people have created their own versions of ‘ObservableCollection’ to provide the functionality that you want. INotifyCollectionChanged contains enough information for its handlers to make note of when a range of items have been affected probably for this reason.
Last but not least, if you bind a collection that has these ‘Range’ type operations you will find that they will work with your UI as you expect