Skip to content

Instantly share code, notes, and snippets.

@AndyWatt83
Last active April 20, 2018 15:22
Show Gist options
  • Save AndyWatt83/831fb8e9f66872b9151e1ce861b3a11f to your computer and use it in GitHub Desktop.
Save AndyWatt83/831fb8e9f66872b9151e1ce861b3a11f to your computer and use it in GitHub Desktop.
using Prism.Mef;
using System.ComponentModel.Composition.Hosting;
using System.Windows;
namespace WireFrame.Shell
{
class Bootstrapper : MefBootstrapper
{
protected override DependencyObject CreateShell()
{
return this.Container.GetExportedValue<Shell>();
}
protected override void ConfigureAggregateCatalog()
{
base.ConfigureAggregateCatalog();
AggregateCatalog.Catalogs.Add(new AssemblyCatalog(GetType().Assembly));
}
protected override void InitializeShell()
{
Application.Current.MainWindow.Show();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment