使用mvvmlight在Windows 8中进行状态处理 [英] state handling in windows 8 using mvvmlight

查看:70
本文介绍了使用mvvmlight在Windows 8中进行状态处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用mvvmlight在Windows 8中执行状态处理 mvvmligt中有什么方法可以管理WinRT中的状态吗?如何使用WinRT复制默认的Suspensionmanager的功能?第二个是关于管理导航周期的,即如果我从页面A-> B.导航到挂起和关闭状态.当我重新启动需要打开页面B的应用程序时,同时按下返回键时我需要加载A.如何在WinRT应用程序中使用MVVM light有效地实现这一点?

Implementation of state handling in windows 8 using mvvmlight Is there any method avilable in mvvmligt to manage states in WinRT? How I can duplicate the functionality of default Suspensionmanager by using WinRT? And the second one is about managing navigation cycle ie if I navigated from page A - > B. and the go for suspend and shutdown state. When I re start the application in need to open page B. and while presses back key I need to load A. How I can effectively implement this using MVVM light in my WinRT application?

推荐答案

我最初是为WP7编写的,并已针对Win8 RT进行了更新.它允许您将属性附加到要保留在视图模型中的属性,然后在应用程序暂停时PersistenceManager对其进行脱水(序列化为文件),并在应用恢复时对其进行脱水.

I wrote this originally for WP7 and have been updating for Win8 RT. It allows you to attach attributes to properties you want to keep in your view models, then the PersistenceManager dehydrates them (serialized to file) when the app is suspended and rehydrates when it resumes.

有WP7和Win8,基本MVVM模式和MVVM Light的示例

There are examples for WP7 and Win8, basic MVVM pattern and MVVM Light

方尖碑

这篇关于使用mvvmlight在Windows 8中进行状态处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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