2016-09-04 22:10:34 +02:00

23 lines
627 B
C#

using System.Windows;
using Autofac;
using Prism.Autofac;
namespace MaterialModernWPF
{
public class Bootstrapper : AutofacBootstrapper
{
protected override void ConfigureContainerBuilder(ContainerBuilder builder)
{
base.ConfigureContainerBuilder(builder);
builder.RegisterType<Shell>();
}
protected override DependencyObject CreateShell() => Container.Resolve<Shell>();
protected override void InitializeShell()
{
Application.Current.MainWindow = (Window) Shell;
Application.Current.MainWindow.Show();
}
}
}