Module Navigation With MenuItem Click?

Topics: Prism v2 - WPF 3.5
Mar 4, 2009 at 3:51 PM
I've been searching the forums and google for a while now and I've seen some people ask the same type of question, but only get partial responses for the most.  I am looking for a very simple sample application that does the following:

1. Dynamically generates a list of modules (directory based) and adds each one to the shell as a <MenuItem>
2. When the menu item is clicked displays the primary view of that module in the main region of the application.

From what I have gathered I should implement the IEventAggregator interface to publish/subscribe to the MenuItems click event, but I am really not sure where to start.  I've looked through the quickstarts provided with the Prism v2 drop and I can't seem to figure out what I need to be doing.

My proof of concept project consists of the shell, and infrastructure, and 2 modules.  The shell has a <Menu> with a region on the 'View' MenuItem (this is where i want to load my list of Modules) and it has a main region (This is where I want to load my modules primary view when the MenuItem is clicked).

To help visualize what I am trying to do imagine Outlook being written as a WPF Prism application.  The Navigation Pane has an entry for each Module (Mail, Calendar, Contacts, Tasks).  Each Module has a list of available Views (Mail > Deleted items, Drafts, Inbox, Junk Mail, etc).  When you click on one of the Views it gets injected into the Main viewing pane and the views available commands are injected into the <ToolBarTray> area at the top.

I know this is possible, and I can't image it would be to hard to do once I saw someone else implement it... but the logic of writing this from scratch is eluding me.

Does anyone know of any such projects that are available for download that I could use as a baseline to get my head around the concept?

Thanks a ton, I appreciate anything from a nudge in the right direction to a full blown example.
Mar 4, 2009 at 4:06 PM

Check out Erwin's post on Outlook style applications.  There's a bit in there that has a navigation piece that is similar to what you're trying to do with menus, although it's not with menus directly.  It may get you pointed in the right direction.