Should one bind DataGrid
to the
ICollectionView = CollectionViewSource.GetDefaultView(collection)
or to the
Observabl
ObservableCollection
implements INotifyCollectionChanged
and will notify the UI when the items in the collection have been changed.
ICollectionView
will give you the ability to filter, sort, or group the collection in addition to propogating INotifyCollectionChanged
events if the underlying collection implements it.
Either type works well with MVVM as long as you bind to it. Use ICollectionView
when you need sorting, filtering, or grouping. Use ObservableCollection
directly when you don't.