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(); } protected override DependencyObject CreateShell() => Container.Resolve(); protected override void InitializeShell() { Application.Current.MainWindow = Shell as Window; Application.Current.MainWindow?.Show(); } } }