Silverlight的+ Galasoft MVVM灯+ MEF加载XAP [英] Silverlight + Galasoft MVVM Light + MEF loading XAP

查看:221
本文介绍了Silverlight的+ Galasoft MVVM灯+ MEF加载XAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序至极具有一定的模块可以这么说。
每个用户有权限查看每一个模块,一些没有看到都有些看所有。

I have an application wich has some "modules" so to speak. Each user has permissions to see each module, some don't see all some see all.

我要加载XAP文件并加载这些视图模型(有观点)在我的应用程序。

I want to load XAP files and load those view models(with views) in my application.

我如何做,与Galasoft MVVM光DeploymentCatalogService?

How do I do that with Galasoft MVVM light and DeploymentCatalogService?

参考

http://mvvmlight.codeplex.com/

http://codebetter.com/glennblock/2010/03/08/building-hello-mef-part-iv-deploymentcatalog/

它甚至更多钞票还是我在这里浪费我的时间? ?如何定位器初始化这个

Is it even posible or am I wasting my time here? How to initialize this in the locator?

因此,让我在这个例子中用户案例解释了这一点:

So let me explain this in this example user case:


  1. 用户登录
  2. 加载应用程序根据用户的权限XAP文件(用户模块,模块组,文章模块,客户模块,模块会计等)=视图模型+查看

  3. 用户点击其中的一个模块和视图模型被启动

  4. 用户使用的应用程序,并很高兴

  1. User logs in
  2. application loads XAP files depending on user permissions (users module, groups module, articles module, customers module, accounting module etc...) = ViewModel + Views
  3. user clicks on one of the modules and the ViewModel gets initiated
  4. user uses application and is happy

目前,我有一个Silverlight项目的所有视图模型。

I currently have all view models in one silverlight project.

推荐答案

阅读这些博客:
http://www.davidezordan.net/blog/ ?p = 1734
http://www.davidpoll.com/2010/02/01/on-demand-loading-of-assemblies-with-silverlight-navigation-revisited -for-Silverlight的4-β/

这篇关于Silverlight的+ Galasoft MVVM灯+ MEF加载XAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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