Passing query string and overriding save state and restore state

Topics: MVVM library, Visual Studio project template
Mar 3, 2013 at 5:34 AM
Passing query string while navigation

How do i pass query string values while navigation through your project template. I didn't find any method that accepts query string parameters.


Save state and restore state.

I fond your response for this in the last thread. Like rkshnair said, i think for a large project, it will not be a better solution (like registering suspending events in view model). Can you please make this global like MS did with Save state and restore state along with suspension manager. If you add that functionality to the template i think it will be more perfect for large projects that deals with many number of pages.

If you didn't add such functionality, I think preferably writing code on code behind is better choice than this project. Because if we cannot make use of such an important feature how we can say the template is complete.

Backstack removal

My last doubt is how i can remove the backstak in windows 8. Is there any supported methods are available in this project template. For example my requirement is, i need a navigation structure like this, (a -> B, B-> C, C->A) I set the option of cash mode enabled in my project.
Coordinator
Mar 3, 2013 at 8:32 AM
Could you please tell me what you are trying to achieve? Why can't you add a method to your model with the required parameter?
Mar 4, 2013 at 8:15 AM
Yup i managed to get the first point working... What about the remaining two points.?
Coordinator
Mar 4, 2013 at 2:48 PM
Edited Mar 4, 2013 at 2:54 PM
Save and restore state:
You do not have to duplicate the code in each page. Simply move this functionality to a base class.
We have no problems in large projects here. And we've done several projects already.

Backstack removal:
So, what is the problem? You can navigate between your pages in any order. And for your convenience we added the NavigationState.Reset() method. This method will clear the navigation history if you need it.
Mar 5, 2013 at 1:08 PM
Save and restore state.

Can you please demonstrate the way you save the page state values. My major concern is with saving page state values based on the active frame. (Ie how i can enc operate state of a particular viewmodel to my active frame like MS did in Layout aware page.
Coordinator
Mar 5, 2013 at 2:36 PM
There is an article in the documentation.