One View many ViewModels

Topics: Conventions, Framework Services, UI Architecture
Apr 11, 2012 at 3:06 PM


I am working on a project where I was matching up a View for each ViewModel.  As I was working on the project I discovered that while my ViewModels are different with respect to the data that they are using then can all end up being mapped to only a few views as they share a lot of commonality.

Is there a way to share Views amongst ViewModels?  Perhaps if the ViewModels share a base class the ViewLocator can walk up the base classes until it finds a view that matches?

I suppose I could also test this theory but I am also looking for some guidance as to what others have done in similar situations.