Silverlight + Galasoft MVVM Light + MEF loading XAP

一笑奈何 提交于 2019-12-11 02:21:42

问题


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.

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

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

Reference:

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. 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

I currently have all view models in one silverlight project.


回答1:


Check out these blogs: 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-beta/



来源:https://stackoverflow.com/questions/6344949/silverlight-galasoft-mvvm-light-mef-loading-xap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!