Windows 8 state management using mvvmlight

Implementing state handling in Windows 8 using mvvmlight Is there any avilable method in mvvmligt for managing state in WinRT? How can I duplicate the default functionality of Suspensionmanager using WinRT? And the second is navigation cycle control, i.e. If I went from page A → B. and go into the pause and shutdown state. When I started the application again, you need to open page B. And when I press the back key, I need to load A. How can I effectively implement this using the MVVM indicator in my WinRT application?

+2
source share
3 answers

I wrote this originally for WP7 and updated for Win8 RT. It allows you to attach attributes to properties that you want to keep in your view models, then the PersistenceManager dehydrates them (serializes to a file) when the application pauses and rehydrates when it resumes.

There are examples for WP7 and Win8, the basic MVVM and MVVM Light template

Obelisk

-1
source

This is not the functionality of MVVM Light. You will need to do it yourself.

One option is to create your own navigation service (see example here ). The navigation service can use the pause manager to create / manage the path for the application. If you added an additional method:

public void GoToMostRecentPage()
{//blah}

.

SuspensionManager. MVVM, , ​​ .

0

Okra App Framework, NuGet CodePlex, . , Windows 8 MVVM ( MVVM Light).

It has a navigation manager that automatically processes everything that you mentioned above - managing the application’s navigation stack, saving the stack when the application is paused / terminated, and even allows the viewing model to save its own state through a simple interface (for example, how SuspensionManager works for pages) .

(disclaimer: I am the lead developer in this project)

0
source

All Articles