Search code examples
windows-8winrt-xamllifecycle

Windows 8 Winrt Application goes to background or close


How can you tell when a windows 8 Metro app gets put in the background? The suspended state doesn't activate. I have a break point on. It only hits if I close the app.

I am using a webcam and since no apps can run in the background I need to save my work when it's put in the background.

The windows phone it was application deactivated.

any help would be nice.


Solution

  • Apps do not normally get suspended when in the debugger. However, you can force a suspend when debugging by:

    1. Enabling the Debug Location toolbar (red arrow in image below).
    2. Then press the Suspend button (blue arrow).

    suspend