donderdag 4 juni 2009

A Viewmodel for the ObservableCollection


In my previous post I wrote about the MasterDetailViewModel. A viewmodel for the navigation of master-detail tables. I briefly mentioned you could extend its base class, the NavigationViewModel class, and create a viewmodel for an ObservableCollection. In this post I will describe such a viewmodel that I called the ObservableViewModel, and give an example of its usage. Because the ObservableViewModel shared a lot of functionality with the MasterDetailViewModel an intermediate viewmodel called CollectionViewModel is needed. The class diagram of the viewmodels now looks like the figure below: image
Shout it kick it on