开发者

Silverlight + Galasoft MVVM Light + MEF loading XAP

开发者 https://www.devze.com 2023-03-13 08:41 出处:网络
I have an applicati开发者_运维知识库on wich has some \"modules\" so to speak. Each user has permissions to see each module, some don\'t see all some see all.

I have an applicati开发者_运维知识库on 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.


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/

0

精彩评论

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