SettingModuleModule.cs 671 B

12345678910111213141516171819202122232425
  1. using FlowChartModule.Model;
  2. using Prism.Ioc;
  3. using Prism.Modularity;
  4. using Prism.Regions;
  5. using SettingModule.Views;
  6. namespace SettingModule
  7. {
  8. public class SettingModuleModule :IModule
  9. {
  10. public void OnInitialized(IContainerProvider containerProvider)
  11. {
  12. var regionManager = containerProvider.Resolve<RegionManager>();
  13. regionManager.RegisterViewWithRegion("ContentRegion", typeof(SettingView));
  14. }
  15. public void RegisterTypes(IContainerRegistry containerRegistry)
  16. {
  17. // 注册服务为单例
  18. containerRegistry.RegisterSingleton<Service>();
  19. }
  20. }
  21. }