Switching the main view using PRISM

Does anyone know a good tutorial on how to switch which module is viewed in the main region if I had a win client consisting of 5 regions, a toolbar, a sidebar (with a menu), a footer and main areas.

I would like to have a menu, and when I pressed menuitem1 or menuitem1, it loaded ModuleA og ModuleB into the main area.

it will be processed with the PRISM course

Sincerly arnor

+4
source share
1 answer

Look here for a complete run of RegionManager. What you do is do a ContentControl / UserControl in your shell, which is assigned as the "Main" area (using the attached RegionManager.Region property), and then in your commands (behind MenuItem1 and MenuItem2 (you use RegionManager to replace what's located in ContentControl, with new material.

If your region is set to an ItemsControl (or deriative) element, the active views will be placed one by one. In ContentControl, the last added will be active, and the rest will be InActive (you can switch using the Activate method).

+5
source

All Articles