How to Switch the view

Topics: Prism v4 - WPF 4
Nov 11, 2011 at 5:30 AM

Hi Agustin,

I have created the sample by switching the region using Ribbon QAT Bar. Region is switching when i pressing Ribbon QAT's. The Region Will display New ribbon Tabs which contains RibbonButton. I want to show new region when i press Ribbon Button which is inside the ribbon Tab. Can please tell me how it can be done.

Please find the sample link under the following location :

Please give me the valuable suggestions.

Thanks and Regards,


Nov 11, 2011 at 5:21 PM


You could try using command bindings in those buttons, and define your command to implement View-Switching navigation in your desired region. To do this you might follow the same approach you used in the ModuleBTaskButton button, inside the sample you provided, which is bound to the ShowModuleBView command, and ends calling a regionManager.RequestNavigate method in its execute method to switch the view in the region.

Also we found in the sample that you are using a regular implementation of the ICommand interface.This has the disadvantage of having to define one class per command. You could benefit from using the DelegateCommand class provided by Prism, which implements ICommand and encapsulates two delegates, that each reference a method that can be implemented within your view model class. You will find more information about DelegateCommands in the Prism documentation at MSDN:

I hope you find this helpful.

Agustin Adami