简体   繁体   English

Windows Phone:在活动应用程序列表中关闭应用程序时发生的事件

[英]Windows Phone : Event when you close app in the active app list

If I close my app with the back-button, the event Application_Closing is raised and the code is executing. 如果使用后退按钮关闭我的应用Application_Closing则会引发事件Application_Closing并且代码正在执行。

When I close my app in the list with active apps, no event is raised... 当我关闭具有活动应用程序列表中的应用程序时,不会引发任何事件...

I really need an event for this. 我真的需要一个活动。

Does anyone know a solution? 有人知道解决方案吗?

There is no event to detect when your app is terminating from the app list. 没有事件可检测您的应用何时从应用列表中终止。 When your app goes to background it will be tombstoned. 当您的应用程序进入后台时,它将被删除。

You can react on this with the Application_Deactivated event. 您可以使用Application_Deactivated事件对此做出反应。 So you should handle both events Application_Deactivated and Application_Closing . 因此,您应该处理事件Application_DeactivatedApplication_Closing

Learn more about the app's lifecycle here . 在此处了解有关应用程序生命周期的更多信息。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM