WP7: Is it possible to intercept the backstack bef

2020-02-07 03:30发布

问题:

You all know the Windows Phone backstack right. If you go through some apps, tap the Home key after starting each app. Now tap and hold the Backkey to see the Backstack. You can now see some small images of your apps, and can pick which one to go to right.

Question: Is it possible to intercept before the backstack image is created? I have tried to blur my page in various events (include OnNavigatingFrom) to no avail.

My guess is some other event (probably something we don't have access to) is triggered and a bitmap is created, because when you use the Backstack to navigate you can just see a slight transition from the saved image to a real page IMO.

Does anyone know if its possible to intercept or manipulate these images on the backstack?

Example screenshot from WP emulator of the Backstack thumbnails

回答1:

Following my comment, I've just tried this:

  1. Set a breakpoint anywhere in the code
  2. Start the app with the debugger attached, then let it reach the breakpoint
  3. While the execution is stopped by the debugger, long press on the back button
  4. The task switching UI is displayed even though the managed code execution is stopped

From there, I think we can safely conclude that the task switching and the thumbnail are handled entirely by native code. Therefore, there's nothing you can do.



回答2:

I recently wrote a blogpost in which I discuss the ways I tried to hide data from the application snapshot. (You can read it here: http://corstianboerman.com/trying-to-hide-crucial-data-from-an-application-snapshot/)

The outcome: You just can't hide it.