开发者

Issues in "WP7" Sudden Tombstoning

I am facing some issues in WP7 tombstoning. My issue is application hangs when i try for a sudden tombstone and come back. ie, After loading the page i press device menu bu开发者_如何学Gotton and with in seconds i pressed back button( Pressed Back button before the actual page disappeared) In that time the page loads but the application hangs / its back key press is not working. and if we try for a slow thombstone it is working perfectly. And the pretty interesting thing is that, while tombstoning the loaded and unloaded events of APP working perfectly. Please any one help me to solve this issue.


It sounds like your App has been deactivated, but not tombstoned. This results in neither the App or Page contrusctor being called, causing your app to act in unexpected ways. I highly recommend reading the Windows Phone Silverlight Application Life Cycle document. The relevant extract for said article:

This case can occur if the user presses the Start and Back buttons on the phone in quick succession. In this case, the application received a Deactivate event and the system was starting to save the state of the application to perform an application tombstone. Before this operation is completed, the app Activated event is received. The system knows that the application was not removed from memory, so the flow of execution is different. Specifically:

• The app constructor is not called.

• The page constructor is not called.

The only way for the application to determine if this condition has occurred is to set a flag to indicate if the page constructor has been called. If you notice in the above section, this flag was set in the page constructor, and cleared in the OnNavigateFrom event. In this case, we will receive the OnNavigatedTo event, but we will see that the page constructor was not called. This tells us that our application was not tombstoned.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜