I'm wondering if anyone here are using Erwin van der Valk's prism extensions (http://blogs.msdn.com/b/erwinvandervalk/archive/2009/03/02/how-to-build-an-outlook-style-application.aspx) for
creating Outlook style applications? It seems Erwin is not responding to comments to the blog post anymore, so my hope is that someone in this forum is able to help.
Now, while I am not using all of the ideas he has come up with, I especially like the idea he has about doing viewmodel first development. His design implies that you bind viewmodels to regions, instead of the normal Prism approach of binding views to regions,
and this is where my problem lies.
Normally you can tell Prism to use the same instance of a view with a certain region, but with Erwin's code, you register the viewmodel with a region:
RegionManager.RegisterViewWithRegion("MyRegionName", () => myViewModel) // Specific vm instance
RegionManager.RegisterViewWithRegion("MyRegionName", typeof(MyViewModel)) // New vm instance each time the region is activated
We use the concept keeping instance of a viewmodel a lot, so that we don't have to re-intialize the vm each time, and restore its state.
However, we sometimes also need to remember the view's state, so that e.g. when the user switches back and forth between tabs, the application remembers list selections, un-commited text box entries etc.
Is there a way of also caching the view along with the viewmodel? E.g. would it be possible to cache the entire VisualizingRegion from Erwin's concept, instead of just the viewmodel. Or is there a an entirely different approach I should consider instead.
I hope someone is able to point me in the right direction