开发者

How do you restore the state between pages?

I have an app which gives me a score at the end of the game and I want the users to share their scores on facebook.

I want scoring information to be restored to the "end game" screen after the user has logged into facebook, and move to the facebook section of the panorama/pivot.

How do I go about th开发者_如何学运维is? Do I save that information to storage or to I use a variable in app.xaml.cs?


You should store this data in the page's State property in the OnNavigatingFrom or OnNavigatedFrom events of the page.
You can then access it again in the OnNavigatedTo event.

The situation you are handling is called tombstoning. Read more about it at http://msdn.microsoft.com/en-us/library/ff817008(v=vs.92).aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜