I've got a big code base we just migrated to phone and are beginning to deal with tombstoning and deactivation. In the meantime I'd like to stop the app on Application_Deactivated so that it will call Application_Launching rather than Application_Activated when reactivating from tombstone. Anyone know of a way to accomplish this?
As far as i know, you should not intervene in the application cycle and let OS handle things. I read that you should not use the following functionality. It is not advised to use it. Though, this is a way ::
Application.Current.Terminate();
Add this line to your Application_Deactivated
handler. This will terminate and kill your application. But then you won't find your app in the background. You will have to launch it freshly the next time you want to use it.
If this is not what you want, and you wish exactly to restart the application on bringing it to foreground, then i don't see any direct way to do that. Thanks and cheers.