I have a view model that currently exposes an ObservableCollection. With my WP7 app, I need to show a secondary screen that basically lets you sort what comes out of the collection, and you to the results again.
I started adding a ApplyOrder method on the view model to address this, but quickly realized I was not sure what direction to take, as when you add the orderby, you wind up with an IOrderedEnumerable.
What is the best way to get those results ordered?
Thanks,
Roger
CollectionViewSourceis your friend.Assign its Source property to your ObservableCollection and Add one or more SortDescriptions.