This project has moved. For the latest updates, please go here.

How to create Sub-Views

Jun 28, 2012 at 4:59 AM
Edited Jun 28, 2012 at 5:05 AM

I am working on a GUI application using Winforms. I want to have my view composed of sub-views.

I found the discussion around creating sub view models, http://waf.codeplex.com/discussions/232118. But all view-models binds to same view.

How can I implement sub-views with sub view models so that I have my view composed of sub-view which can be reused.

Jul 6, 2012 at 9:15 AM

Hi ash,

instead of building large ViewModels I just made the smallest possible ViewModel (one for a list, a second for Details a.s.o.)
Just as you can see at the BookLibrary-Sample.

The communication between them is handled by a Controller - This way I can reuse the ViewModels and can build a Master-List, Detail-List, Selected-Master-Detail-Form, Selected-Detail-Detail-Form View without compromising the ViewModels in any way.

Chris

Dec 26, 2012 at 4:38 PM

Hi ChristianPeters,

Any chance to elaborate on your approach and provide more details on the controller side? I'd like to build a master-detail DatGgrid pair; thanks in advance.