I am currently in the process of putting together a prototype Prism application to illustrate the design patterns that we will be using here and so I am trying to get everything "right".
Loading views into regions seems quite neat (using MEF) and with custom adapters I am able to use various DevExpress controls (such as the docking control) for layout. All good so far.
My problem is how best to extend menus from modules. Ideally I want to use the DevExpress BarManager, but I guess my question would would also work for the .NET framework Menu/MenuItems too.
Using regions don't seem to be the right choice here. This would require a custom adapter and I suppose a xaml file for each menu item linked to a Command most likely stored somewhere in the main module controller. This seems like a messy pattern (if I can
even get this to work - I'm not sure exactly what I would be putting in the xaml file for DXBarManager which has a lightly more complex structure than menu/menuitem).
My next thought (and the way I will head unless a decent suggestion presents itself) was to have a "MenuService" class shared from the shell that the modules can resolve and use to extend the menu. i.e. In the main module controller class for each
module you would resolve the MenuService and call various methods (e.g. MenuService.GetMenu("View").AddMenuItem("Properties", OpenPropertyWindowCommand) - where OpenPropertyWindowCommand is defined in the controller class and resolves a
particular view and loads it into a region in the shell.
The menu service would abstract away from the particular implementation of the menu in the shell which could follow an mvvm pattern (with the model being presented to the shell view by the service).
I guess that this idea is something like this
http://www.codeproject.com/KB/silverlight/UIExtensionSites.aspx , which is something similar to the Extension Sites idea that was in CAB.
I have looked at the various Prism Quickstarts but can't see anything suitable in there. The closest thing is the View-Switching one but this one only really seems to suit a situation where your Links really are like Views (i.e. each "link" is
really arbitrary xaml), rather than an extending an actual Menu object.
What are peoples experience with this? Does anyone have any good suggestions for me?