Windows Phone 7 close application

Viewed 13092

Is there any possibility to programatically close Silverlight application on Windows Phone 7?

14 Answers

Add a reference to Microsoft.Xna.Framework.Game, then call:

new Microsoft.Xna.Framework.Game().Exit();

Navigate to App.xaml.cs in your solution explorer and add a static method to the App class

public static void Exit()
{
      App.Current.Terminate();
}

so that you can call it anywhere from your application , as below

App.Exit();
Related