/// Interaction logic for App.xaml /// </summary> public partial class App : PrismApplication protected override Window CreateShell() return Container.Resolve<MainWindow> (); protected override void InitializeShell(Window shell) if (Container.Resolve<LoginWindow>().ShowDialog() == false ) Application.Current ? .Shutdown(); else if (Container.Resolve<MainWindow>().ShowDialog() == false ) Application.Current ? .Shutdown(); base .InitializeShell(shell); /// <summary> /// ioc注入 /// </summary> /// <param name="containerRegistry"></param> protected override void RegisterTypes(IContainerRegistry containerRegistry) // containerRegistry.Register<>(); /// <summary> /// 模板配置, /// </summary> /// <param name="moduleCatalog"></param> protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog) // 可以改成自动扫描 moduleCatalog.AddModule<MenuModule> (); moduleCatalog.AddModule <BaseInfoModule> (); // base.ConfigureModuleCatalog(moduleCatalog);

源码地址:https://gitee.com/null_044_9298/prismWpfDemo.git