Olaf,
After some testing today, I’ve noticed that there is an issue with the Obscured/Unobscured events.
The Obscured event gets raised when you press the power button to turn off the screen (that’s fine). When you press the power button again and slide off the screen lock, the Unobscured event gets raised (that’s fine too). However, if you very slowly slide up the screen lock, what happens is that the Obscured event gets raised again, but an Unobscured event does not get raised when you finish sliding off the screen lock. It sounds like a bug in Microsoft’s XAML framework that we’ll have to find a way to work-around.
Here’s a quick procedure on how to reproduce this issue:
1) Start up your app.
-
Press the power button to turn off the screen. (Suspends your app.)
-
Press the power button again to show the screen lock.
-
Very slowly slide the screen lock up to get back to your app.
Result: The screen is black and your app has not been resumed.
And you can put breakpoints in your Obscured/Unobscured event handlers to see what I’m talking about.
I’m looking into finding a work-around for this today.