tags:

views:

30

answers:

1

hi

Does anyone know of good tutorial how to switch what module is viewed in main region if i would have a win client that consist of 5 regions, Toolbar, Sidebar (with menu), footer and main regions.

I would want to have menu and when i pressed menuitem1 or menuitem1 it would load ModuleA og ModuleB in the main region.

this would be handled with PRISM off course

Sincerly Arnor

+2  A: 

Look here for a complete run-through of the RegionManager. What you do, is make a ContentControl/UserControl in your shell that is assigned to be the the 'Main' region (using the attached RegionManager.Region property) - and then in your commands (behind the MenuItem1 and MenuItem2( you use the RegionManager to replace whatever is in the ContentControl with the new stuff.

If your region is set in an ItemsControl (or deriative) active Views will be placed one after another. In a ContentControl the last added will be Active and the rest InActive (you can switch with the Activate-method).

Goblin