简体   繁体   English

Caliburn微wpf多个项目

[英]Caliburn micro wpf multiple projects

I want to start breaking my quickly growing projects up into more modular/smaller pieces. 我想开始将快速增长的项目分解为更多模块化/更小的部分。 How would you go about breaking your views/viewmodels up into other projects, sometimes not even knowing who is tapped into the events/messaging/conductor pipeline until runtime? 您如何将您的视图/视图模型分解为其他项目,有时甚至不知道在运行时之前是谁接入事件/消息传递/导体管道?

At minimum, I just need to organize my view/viewmodels more eloquently, at most I would love to take the MEF + Caliburn Micro + WPF party to the next level with some modularity. 至少,我只需要更加雄辩地组织我的视图/视图模型,最多我希望将MEF + Caliburn Micro + WPF派对带入一个模块化的下一个级别。

So, any ideas how I get started? 那么,我是如何开始的? Some talk of overriding the create in appbootstrapper but the examples all seem pre MEF. 一些关于覆盖appbootstrapper中的create的讨论但是示例都看起来都是MEF之前的。

-J -J

Have you already seen that Tutorial on caliburn.micro? 您是否已经在caliburn.micro上看过该教程?

Mindscape "caliburn.micro getting started" Mindscape“caliburn.micro入门”

In Chapter 4 there is a good description of what to do when you want to utilize MEF 在第4章中,您可以很好地描述当您想要使用MEF时该怎么做

Mindscape "Eventaggregator (including a Bootstrapper with MEF)" Mindscape“Eventaggregator(包括MEF的Bootstrapper)”

Consider using PRISM . 考虑使用PRISM This is built to do exactly what you are asking for and can be used together with MEF. 这是为了满足您的要求而设计,可以与MEF一起使用。

It all happens in your Bootstrapper . 这一切都发生在你的Bootstrapper中 There you can configure your IoC (and/or MEF) to load/compose the views/viewmodels from wherever you want using whatever conventions you want. 在那里,您可以使用您想要的任何约定来配置IoC(和/或MEF)以从任何地方加载/组合视图/视图模型。 It provides several useful overridable methods for this puprose. 它为这种puprose提供了几种有用的可覆盖方法。 See this for an example with MEF. 与MEF的例子。

You can go through this 10-part series of awesome videos on PRISM + Unity which teaches from scratch (what you are asking) - http://channel9.msdn.com/blogs/mtaulty/prism--silverlight-part-1-taking-sketched-code-towards-unity . 你可以在PRISM + Unity上看看这个由10部分组成的精彩视频,这些视频从头开始教你(你要问的是什么) - http://channel9.msdn.com/blogs/mtaulty/prism--silverlight-part-1-以速写代码为统一

NB: It has nothing to do with Silverlight. 注意:它与Silverlight无关。

Give it a go ! 搏一搏 !

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM