PRISM + MEF + MVVM-不知道从哪里真正开始? [英] PRISM + MEF + MVVM -- Not sure where to really start?

查看:101
本文介绍了PRISM + MEF + MVVM-不知道从哪里真正开始?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用什么:

  • Visual Studio 2010
  • Microsoft .NET Framework 4
  • Prism v4

我要弄清楚的是如何在保持MVVM模式的同时开始使用Prism + MEF.当我进入Prism Quickstarts时,它具有Prism + MEF,但是项目中的注释明确指出Quickstart示例未实现MVVM.我不太确定要混合/匹配什么,以便我的外壳本身遵循MVVM(和区域).

What I am trying to figure out is how to get started with Prism + MEF while maintaining the MVVM pattern. When I go into the Prism Quickstarts, it has a Prism + MEF, but the comments in the project specifically state that the Quickstart example does not implement MVVM. I'm not really sure what to mix/match so that my shell itself follows MVVM (and regions).

基本上,我希望使用MEF能够在运行时加载程序集(模块).而且,我想在Shell中设置区域并让Shell使用MVVM(以便可以将内容数据绑定到Shell).在线上的每个示例都是Prism,Prism + MVVM,Prism + Unity,Silverlight示例,Prism + MEF等.但是我找不到任何WPF Prism + MEF + MVVM示例或信息.我真的不知道如何设置我的引导程序等等.

Basically, I want to use MEF to be able to load Assemblies (Modules) at run-time. And, I want to setup regions in my Shell and have the Shell use MVVM (so I can databind things to the shell). Every example online is either Prism, Prism + MVVM, Prism + Unity, Silverlight examples, Prism + MEF, etc. But I can not find any WPF Prism + MEF + MVVM examples or information. I really have no idea how to setup my bootstrapping and such to get going.

完成这一部分后,我确定我会弄清楚如何使用MVVM将其他控件加载到我的shell中.任何帮助都将是巨大的,尤其是直接用于处理这种情况的资源(例如Prism + Unity且没有MEF).谢谢!

Once that part is done, I'm sure I'll figure out how to load other controls using MVVM into my shell. Any help would be great, especially resources that deal directly with this situation as apposed to something similar (i.e. Prism + Unity and without MEF). Thanks!

推荐答案

Prism随附的示例中似乎都包含您所询问的所有内容,而您只是看错了.

Everything you asked seems to be present on the samples that come installed with Prism, you just looked at the wrong ones.

检出 StockTrader RI 文件夹,即在此描述.

它具有用于现实生活应用程序的相当完整的示例,具有一些复杂的场景,并使用Prism(显然),MVVM和MEF进行了实现.

It has a fairly complete sample for real-life applications, with some of complex scenarios and is implemented with Prism (obviously), MVVM and MEF.

编辑:即使我提供的链接是针对Prism 5的,该示例也存在于Prism 4.1上.在该版本中,该文档无法在线获得(至少据我所知),而是在与Prism源代码+示例一起安装的.chm文件中提供.不过,对于v4.0还是一无所知.

Even though the link I provided is for Prism 5, the sample was also present on Prism 4.1. In that version, the documentation was not available online (at least as far as I remember) , but was instead offered on a .chm file installed with the Prism source code + samples. Don't know about v4.0, though.

这篇关于PRISM + MEF + MVVM-不知道从哪里真正开始?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆