Question about Navigation/Page Lifecycle

Topics: Getting Started
Jul 31, 2011 at 5:25 PM

Hi,

since I am still a beginner with the caliburn micro framework, I have a question about how to implement the following behaviour on WP7:

I have a CategoryPage which is basically displaying a listbox of categories. A category can have X sub-categories. So when I tap a category, I want to see the children in the same way. When I tap a category which don't have a child, I navigato to another Page, lets call it Page2. When I hit the back button, I want to see the last displayed category again.

I have decided to use the same Page for all categories. When I tap a category, I get the children and bind them to the listbox. But When I want to navigate from Page2 back to the CategoryPage I don't know how to get the last showed category.

I don't know which is the best way to implement this and where and how to store the state.

Maybe my idea is wrong, and there is a much simplier approach for the desired behaviour. So please let me know :-)

 

Thanks, Marc