Recommended

Skip Navigation LinksHome / Articles / View Article

CollectionView

+ Add to SilverlightShow Favorites
3 comments   /   aggregated from Tales from the Smart Client on Mar 07, 2006  /  original article
(0 votes)
Categories: Learn , Misc

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.

Share


Comments

Comments RSS RSS
  • RE: CollectionView  

    posted by A. Blogger on Jan 22, 2010 15:51
    Hi - Views have been aroudn for a long time before graphical user interfaces. For example a database view, where data is somehow filtered. So the use of View is entirely appropriate :-)
  • RE: CollectionView  

    posted by A. Blogger on Jan 22, 2010 15:51
    Hi - Views have been aroudn for a long time before graphical user interfaces. For example a database view, where data is somehow filtered. So the use of View is entirely appropriate :-)
  • RE: CollectionView  

    posted by A Blogger on Jan 22, 2010 15:52
    Hi - Views have been aroudn for a long time before graphical user interfaces. For example a database view, where data is somehow filtered. So the use of View is entirely appropriate :-)

Add Comment

 
 

   
  
  
   
Please add 8 and 2 and type the answer here:

Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)