首页 > 其他 > 详细

Prism Sample 7 Modules Code

时间:2021-06-07 16:15:15      阅读:22      评论:0      收藏:0      [点我收藏+]

例7对注册Module使用了配置命令。

见app.xaml.cs:

 1 using Modules.Views;
 2 using Prism.Ioc;
 3 using Prism.Modularity;
 4 using Prism.Unity;
 5 using System.Windows;
 6 
 7 namespace Modules
 8 {
 9     /// <summary>
10     /// Interaction logic for App.xaml
11     /// </summary>
12     public partial class App : PrismApplication
13     {
14         protected override Window CreateShell()
15         {
16             return Container.Resolve<MainWindow>();
17         }
18 
19         protected override void RegisterTypes(IContainerRegistry containerRegistry)
20         {
21 
22         }
23 
24         protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
25         {
26             moduleCatalog.AddModule<ModuleA.ModuleAModule>();
27         }
28     }
29 }

其中的ConfigureModuleCatalog (catalog目录)用来逐项增加模块。

Prism Sample 7 Modules Code

原文:https://www.cnblogs.com/cbaa/p/14858980.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!