programatically suspend an app RRS feed

  • Question

  • Hi,

    I'm developing a Kiosk type application. I need to provide a button on the app page to quit the app. This is because user may want to go to Desktop mode.

    I tried App.Current.Exit() but it doesn't shutdown or raise suspending() event. Also window remains visible in the taskbar. 

    Is there any way to programatically suspend/exit an app? 


    Friday, November 21, 2014 9:17 PM


  • No. You cannot directly force an app to suspend.

    You can exit it by calling Application.Exit, but (as you note) that is an exit. It doesn't do any cleanup. It doesn't trigger suspending since you're explicitly exiting. It is recommended against and generally appears as a crash to the user.

    You can launch a file or protocol and that will switch away from the app to the default handler. Depending on how that launches the app will likely suspend, but it's not guaranteed. For your kiosk scenario you may be able to control the environment enough to manage that.

    Since you're side-loading you can use a Windows Runtime Component to more directly activate your desktop app.

    Saturday, November 22, 2014 12:37 AM