1

I want to use some assemblies containing views and viewmodels exported using prism/mef in some other program. This other program does not contain a custom MefBootstrapper (since it does not use mef).

Creating the catalog and container is easy, but when I call Container.GetExportedValue() I always get null as result even though SomeView exists in the container (I looked).

I guess I need this part of the custom MefBootstrapper:

protected override Microsoft.Practices.Prism.Regions.IRegionBehaviorFactory ConfigureDefaultRegionBehaviors()
{
  var factory = base.ConfigureDefaultRegionBehaviors();
  factory.AddIfMissing("AutoPopulateExportedViewsBehavior", typeof(AutoPopulateExportedViewsBehavior));
  return factory;
}

But how and where do I call this when I don't use a MefBootstrapper?

Sam
  • 28,421
  • 49
  • 167
  • 247
  • Can you post the code that is trying to get the export, and maybe the code where the part is being exported? – Matt Jul 29 '13 at 14:34

0 Answers0