Passing state between pages?

后端 未结 2 1950
滥情空心
滥情空心 2021-01-22 09:59

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 everythin

2条回答
  •  青春惊慌失措
    2021-01-22 10:26

    You have a couple of options:

    1. Use the query string as you suggested. This makes sense from a web development perspective, but we aren't in a web development perspective.
    2. Use a static variable. This is probably the simplest. Just declare another class with a static property, and you can share data this way. The only concern with this approach is thread-safety.
    3. Use Isolated Storage.

提交回复
热议问题