locked
Closing a Windows Store App Programmatically

    Question

  • This is probably a relatively simple question for someone who knows the answer, but unfortunately that person is not me. I want to add a Button to my Windows Store app that allows the user to close it (for example, when their game is over), but I have been unable to find a way to do this. Is there a method or commonly used technique for any of the available classes that can let me do this? Thanks.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Monday, April 07, 2014 5:15 PM

Answers

  • Closing should be a user action. Instead leave the user at a game over screen and let them close the app themselves. Even better, give them a "Play again" button.
    Monday, April 07, 2014 5:36 PM
    Owner
  • Windows provides the standard close functionality for you (including a close button with the new update).

    Programmatically exiting the application will not work correctly and is not recommended.

    --Rob

    Monday, April 07, 2014 9:08 PM
    Owner

All replies

  • Closing should be a user action. Instead leave the user at a game over screen and let them close the app themselves. Even better, give them a "Play again" button.
    Monday, April 07, 2014 5:36 PM
    Owner
  • I do leave them at a game over screen, it shows the winner as well as a play again button. But because the game is one that people will rarely be playing more than once at a time, I figured most users (especially ones that are still getting used to Windows 8 and the Metro interface) would like the convenience of also having a close button. They do, of course, still have the option of closing the app the usual way, I do not prevent them from doing that, I just figured this would be a nice convenience for a game that is not usually played multiple times back to back.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Monday, April 07, 2014 6:43 PM
  • Windows provides the standard close functionality for you (including a close button with the new update).

    Programmatically exiting the application will not work correctly and is not recommended.

    --Rob

    Monday, April 07, 2014 9:08 PM
    Owner