So far, we couldn't reproduce the behavior you are mentioning. We tried using
ViewExport attribute with MEF and importing the
RegionManager as you mentioned but we obtain the regions count from the
RegionManager as expected.

Perhaps, you could provide us with a little more information about your scenario or a repro sample application so we can help you further with this.

I believe that this could be related to a known issue in Prism where, if a region is defined inside a
DataTemplate, the region and all of its child regions will not be registered in the
RegionManager. For example, if a shell has its "MainRegion" inside a
DataTemplate, this region and any other region inside it will not be registered in the
RegionManager. In this scenario the RegionManager
would be empty while the ViewExport and its AutoPopulateExportedViewsBehavior
would work, as they don't require a RegionManager.

You can find more information about this issue as well as several workarounds for it in the following work item:

Also, this could be related to another known issue where if the AutoPopulateExportedViewsBehavior or the
AutoPopulateRegionBehavior is registered before the RegionManagerRegistrationBehavior, the regions are never registered in the
RegionManager. In order to avoid this, you could invoke the base implementation of the
ConfigureDefaultRegionBehaviors method before registered the
AutoPopulateExportedViewsBehavior in your bootstrapper. You can find more information in the following work item:

If none of those are your scenario, it would be helpful if you could provide us with a repro-sample application portraying this problem, so that we can help you further with this. You can upload your sample-application to
SkyDrive or any other file hosting service of your preference.

Some more tests and it turns out to be related to the Adapters somehow and the way the regions are nested

FYI - I'm using DevX controls

The AppShell define a region called MainShellRegion

There's a shell module which defines regions called MainRegion ( devx DocumentGroup control ), NavBarRegion( LayoutPanel control) and other modules which render into these views and are unaware of MainShellRegion

The problem where IREgionManager.Regions.Count occurs with this setup

Now if i change the AppShell to directly include MainRegion, NavBarRegion, RightRegion etc.

then the code above works fine and IREgionManager.Regions.Count returns TWO as it should

so it appears to be related to the DocumentGroupAdapter and/or LayoutPanelAdapter from here

http://www.devexpress.com/Support/Center/e/E3339.aspx

I hope this is a known issue else I'll create a repro app and post it on their support channel