关闭

Windows Phone的生命周期

132人阅读 评论(0) 收藏 举报

Launching(启动)

在此期间,不建议访问IsolatedStorage和network,同样也不建议打开transient状态的实例(因为这是启动周期)。这样会减慢程序加载速度,影响用户体验。如果非要这么做,应使用异步操作。

Running(运行)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

戳:

http://msdn.microsoft.com/en-us/library/ff817009%28v=VS.92%29.aspx


After an application has been tombstoned, the user may not return to the application. For this reason, you should save persistent state to isolated storage both in the Deactivated event handler and in the Closing event handler. To avoid duplicating code, you may want to create a single method that saves persistent data to isolated storage and call the same method from both event handlers.


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:10970次
    • 积分:204
    • 等级:
    • 排名:千里之外
    • 原创:10篇
    • 转载:0篇
    • 译文:2篇
    • 评论:0条
    文章分类
    文章存档