Is there a good replacement for PhoneApplicationService.State in Windows Phone 8.1 (Universal App)?

这一生的挚爱 提交于 2019-12-14 03:10:07

问题


I'm porting a Windows Phone 8.0 app to a universal store app. I used the state dictionary frequently to pass state info between pages. I know the new navigation service has support for a parameter, but I was looking for something that can store state outside the scope of the page. Does anyone know the "universal app way" of keeping state information in the scope of the app?


回答1:


The replacement is the SuspensionManager.

You can use SuspensionManager.SessionState instead of PhoneApplicationService.Current.State




回答2:


check this blog.

you can pass object directly to Navigate function.



来源:https://stackoverflow.com/questions/23749975/is-there-a-good-replacement-for-phoneapplicationservice-state-in-windows-phone-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!