Suspend camera when user switches away from app, and resume camera when user switches back to app

守給你的承諾、 提交于 2019-12-08 17:03:36

From the MSDN article you referred.

App visibility When the user switches from your app to another app, your app is no longer visible but remains in the running state until Windows can suspend it (for about 10 seconds). If the user switches away from your app but activates or switches back to it before Windows can suspend it, the app remains in the running state. Your app doesn't receive an activation event when app visibility changes, because the app is still running. Windows simply switches to and from the app as necessary. If your app needs to do something when the user switches away and back, it can handle the VisibilityChanged | msvisibilitychange event. The visibility event is not serialized with the resume or activation events. Don't assume that these events come in a particular order.

check out the VisibilityChangedEvent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!