开发者

WPF Prism: Can you load modules as needed on the fly?

I know that with Prismv4 / MEF you can load modules without including them in your bootstrapper, but could I load modules on the fly as needed? That is, I have a menu of forms:

Then, only when someone clicks Form 1 does it load the Form1.dll as a module, etc.


Yes...load modules on demand.

You essentially need a reference to the IModuleManager. With this you can call...

IModuleManager manager = //get this via DI within a constructor perhaps...
manager.LoadModule("ModuleName");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜