Reputation: 61398
I have a Silverlight Windows Phone 7 app with two pages. I want to pass some nontrivial state (an array or structs) between them. Do I have to follow a Web model where everything needs to be packed into query string? Makes little sense when all pages and classes are on the same device, within the same process and assembly.
So the questions are:
- upon navigation between pages, is there a good way to pass data as-is?
- upon page navigation, does code-behind of the source page have access to the code-behind of the destination page (or vice versa)?
- is there any shared user object that all pages can refer to (like an ASP session)?
Alternatively, is there a way to nest XAML's? I could make do with a model where there's a outer container page that loads different content pages into a panel on it.
Upvotes: 2
Views: 569
Reputation: 141703
You have a couple of options:
Upvotes: 4
Reputation: 6953
No you don't have to pass everything in a query string. Just pass an id and store the data non-trivial data in isolated storage between pages.
There is a series of articles on how to to do this here
Upvotes: 2