WinRT MVVM Light Sample Project

穿精又带淫゛_ 提交于 2019-12-04 10:56:40

问题


If anyone starts developing Windows 8 metro applications using MVVM Light please help me to create a Windows 8 (WinRT) project template. I get bored by using Microsoft ‘s Layoutaware page(Base class). I just need to structure the class with the help of MVVM Light. If any one did this please help me or provide some links to start developing Windows 8 Metro application using MVVM Light.

The major areas where i am facing issues are:

  1. Navigation (Forward and Backward)
  2. State Handling (Tombstoning in windows 8)
  3. Navigation after the app launches form termination state etc.
  4. Handling WebService [ Post using http client ]

回答1:


There is an (older) example of using MVVM Light with windows 8 found here. There are also templates and Samples as part of the MVVM Light source found here.

Edit: Here is an msdn example using MVVM Light.




回答2:


What about this

But I did not try it. I'm using Portable class library (with targets Windows 8.1 and .NET x.xx) and this library is referenced to WinRT project. MvvmLight for PCL you can find on this link

Problem is, that you can't access Local files and Local settings but you can inject it from Presentation project to Portable class library at the start.

This solution has a lot of advantages and one of the is : easiest unit testing.

For more info look this stack overflow thread



来源:https://stackoverflow.com/questions/11632285/winrt-mvvm-light-sample-project

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