Windows Phone 8.1 - 保存和加载页面状态 [英] Windows Phone 8.1 - Saving and loading page state

查看:154
本文介绍了Windows Phone 8.1 - 保存和加载页面状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我有3页:第一页 - 主页,第二页 - 数据页,第三页 - SimplePage。我想在导航到SimplePage时保存PivotPage状态并在返回时加载它。我尝试使用NavigationHelper类,但是当我从PivotPage返回到MainPage然后再次导航到PivotPage时,它还保存并加载PivotPage状态
,这是不可取的。有没有人可以帮我处理这个?

解决方案

只需保存App.xaml.cs中每个页面的信息,并在需要时用它来加载任何页面的数据

Hi. I have 3 pages: first - MainPage, second - PivotPage, and third - SimplePage. I want to save the PivotPage state when I'm navigate to SimplePage and load it when go back. I tried to use NavigationHelper class but it also saves and load PivotPage state when I back from PivotPage to MainPage and then navigate to PivotPage again, which is not desirable. Does anyone can help me handle this?

解决方案

just save the information of each page in App.xaml.cs and use it to load data for any page when you need.


这篇关于Windows Phone 8.1 - 保存和加载页面状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆