CollectionView

CollectionView is a very interesting construct.  After including it in my ViewModel I meant to quickly blog about the usage...but when I started thinking about it and reading a bit more about it, it becomes even more interesting.  Lots of good blogging.  However, while I think about it, let me quickly make my original point.

The Model has a simple List.  CollectionView wraps a Collection and adds concepts like selection, sorting and filtering to it and supports the INotify... goodness that data binding wants in order to do a really good job.  So, CollectionView is a construct that wraps a Model class and adapts it for data binding from the UI.  Uh...sounds like a ViewModel!

WPF does not use the terminology of M-V-VM, but it repeatedly uses the pattern.  CollectionView is a fine class name, but in very strict terms it isn't part of the View!  A CollectionView implies it has UI. 

If you really want to understand the M-V-VM pattern, there is no better place to start than to study how CollectionView adapts a Collection to be presented in the UI using data binding. 

Going to visit the in-laws, so blogging will be sporatic for awhile.