views:

29

answers:

0

Hello folk,

I'm writing an application using DevExpress controls and Prism. I have a BarManager in the shell with the main menu bar and marked this bar as a region.

<dxb:BarManager Name="barManager">
    <dxb:BarManager.Bars>
        <dxb:Bar Caption="Main" IsMainMenu="True" UseWholeRow="True" cal:RegionManager.RegionName="{x:Static infrastructure:RegionNames.MainMenuBar}">

        </dxb:Bar>
    </dxb:BarManager.Bars>
</dxb:BarManager>

If I run this without a custom region adapter, I get an exception "No region adapter for region MainMenuBar found". So I created a custom region and register the region mapping.

    protected override RegionAdapterMappings ConfigureRegionAdapterMappings()
    {
        RegionAdapterMappings mappings = base.ConfigureRegionAdapterMappings();
        mappings.RegisterMapping(typeof(Bar), this.Container.Resolve<MenuBarAdapter>());

        return mappings;
    }

Fine, it runs without exception, but the region does not get registered. So anyone an idea what is wrong?

Thanks for help, Enyra