0
votes

Is it possible to have nested regions in a Composite WPF application? I want modules to be able to inject new menus, and also be able to inject menu items into an existing menu.

Using the following code the RegionManager throws an exception:

The region manager does not contain the MainFileMenuRegion region

<Menu cal:RegionManager.RegionName="MainMenuRegion">
    <MenuItem cal:RegionManager.RegionName="MainFileMenuRegion" Header="_File" />
</Menu>
2

2 Answers

0
votes

I don't know whether its 'right' but I do nesting by having a region on the injected view that I then inject the sub view into.

0
votes

One workaround I've come up with is to simply use two Menus arranged with a Grid. The first one has all my standard menus and allows me to inject into each one individually. The second is empty and allows me to inject new top-level menus.