简体   繁体   English

Isolatedstoragesettings.applicationsettings.save不保存

[英]Isolatedstoragesettings.applicationsettings.save does not save

I am developing an app for windows phone 7.My app communicates with a server which sends it some data which I display on the UI.And I save the state of my app in ApplicationSettings. 我正在为Windows Phone 7开发一个应用程序。我的应用程序与服务器进行通信,该服务器向我发送一些我在UI上显示的数据。我在ApplicationSettings中保存了我的应用程序的状态。

And I have found that sometimes 我有时发现了

ApplicationSettings.Save() doesnot save the current state.Rather when I start my app it resumes with the previous state which was stored successfully. ApplicationSettings.Save()不保存当前状态。当我启动我的应用程序时,它恢复到以前保存成功的状态。

Actually I call save method when my app is closing. 实际上,当我的应用程序关闭时,我会调用save方法。

But I just want to know if my app is making some changes on the ui.Then is there a possibility that it could be the reason for not saving the state. 但我只想知道我的应用程序是否对ui进行了一些更改。那么它是否有可能成为不保存状态的原因。

If that is the case then what should i do to save my state properly. 如果是这种情况那么我该怎么做才能正确保存我的状态。

If you are saving ONLY when the app is closing (ie Application_Closing), then you are not capturing the state often enough. 如果您仅在应用程序关闭时保存(即Application_Closing),那么您不会经常捕获该状态。 Depending upon how you have exited the app, there are times when the application is simply deactivated, but not necessarily closed. 根据您退出应用程序的方式,有时候应用程序只是被停用,但不一定是关闭的。 If the app is subsequently tombstoned after deactivation, you will have needed to save the state appropriately to restore it back. 如果应用程序随后在停用后进行逻辑删除,您将需要适当地保存状态以将其恢复。

Here is an article to give you a better idea of the different states. 这篇文章是为了让您更好地了解不同的状态。

Windows Phone 7 Tombstoning Windows Phone 7 Tombstoning

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将列表保存到IsolatedStorageSettings - Save List to IsolatedStorageSettings wp7 isolatedstoragesettings.save是否再次重写了整个数据 - does wp7 isolatedstoragesettings.save rewrites the whole data again 如何将IsolatedStorageSettings密钥保存到字符串 - How to save IsolatedStorageSettings key to a string 在IsolatedStorageSettings.ApplicationSettings中存储提醒 - Store Reminder in IsolatedStorageSettings.ApplicationSettings 将接口类型对象保存到IsolatedStorageSettings中,进行序列化 - Save interface type object to IsolatedStorageSettings, serialization 在运行时保存并重新加载 app.config(applicationSettings) - Save and reload app.config(applicationSettings) at runtime IsolatedStorageSettings.ApplicationSettings不存储 - IsolatedStorageSettings.ApplicationSettings doesn't get stored IsolatedStorageSettings适用于Windows Phone app 8的ApplicationSettings - IsolatedStorageSettings ApplicationSettings for Windows Phone app 8 updates 从逻辑删除返回的数据后,IsolatedStorageSettings.ApplicationSettings中的数据消失 - Data from IsolatedStorageSettings.ApplicationSettings disappears on return from tombstone App-Restart(WP8)后,IsolatedStorageSettings.ApplicationSettings被关闭 - IsolatedStorageSettings.ApplicationSettings are dismissed after App-Restart (WP8)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM