title: WPF, Prism, MEF. Register region adapter within a module?
body: <p>Is it possible to register a region adapter within a module?</p>
  
  <p>I have a ContentControl in my Shell.xaml set to region "MainRegion" that currently gets populated with a module containing the AvalonDock control. I currently have the AvalonDock region adapter in my Shell app but would like to place it in the module and register itself. I want to keep this program flexible so that if we decide to use something other than AvalonDock, I can easily use another module without having to modify my Shell assembly (removing the avalondock region adapter).</p>
  
  <p>I imagine something like this is possible. Has anyone done this before? </p>
  
  <p>In bootstrapper right now is:</p>
  
  <pre><code>protected override RegionAdapterMappings ConfigureRegionAdapterMappings()
  {
      RegionAdapterMappings mappings = base.ConfigureRegionAdapterMappings();
      var regionBehaviorFactory = Container.GetExportedValue&lt;IRegionBehaviorFactory&gt;();
      var regionManager = Container.GetExportedValue&lt;IRegionManager&gt;();
      mappings.RegisterMapping(typeof(Pane), new AvalonRegionAdapter(regionBehaviorFactory, regionManager));
  
      return mappings;
  }
  </code></pre>
  
  <p>This is what I would like to perform in the Module instead of the Shell bootstrapper.</p>