In a WPF app I have a ListView bound to an ObservableCollection on my ViewModel.
During the running of the application I need to remove and reload all the items in the collection. I do not ever need to add or remove single items.
This prompts the question whether an ObservableCollection is really necessary and whether I could just bind the ListView to an IEnumerable and call OnPropertyChanged when the collection is replaced?
Since ObservableCollection does not have an AddRange method, the only way of reloading without replacing the collection would be to add each item individually. Is this likely to have any major performance implications since CollectionChanged is fired for each item added?
Finally, since I am using ICollectionView to synchronize the currently selected item, if I do replace the collection, will I need to call CollectionViewSource.GetDefaultView again? I assume I can reuse the existing CurrentChanged handler.
Thanks Ben