MVVM CollectionViewSource Sorting and Filtering

MVVM CollectionViewSource Sorting and Filtering

Old forum URL: forums.lhotka.net/forums/t/10003.aspx


JonM posted on Saturday, January 29, 2011

I need to implement both sorting and filtering in my Silverlight MVVM project.  I see that the collectionViewSource has a event handler for filtering and a property for sorting.  It seems like the filtering handler and the sorting code should live in the ViewModel not in the UI code-behind.  Does that make sense?  I'm new to the whole MVVM model (I just finished the video series).  Any ideas on how to accomplish this?

Copyright (c) Marimer LLC