Results 1 to 5 of 5

Thread: Exit a Silverlight Application

  1. #1
    Join Date
    Oct 2010
    Posts
    76

    Exit a Silverlight Application

    I am using a HTC Windows Mobile phone on which i have installed the latest Windows Phone 7 operating system. I am stuck to close one application on this phone called as Silverlight. Actually there is no issue while using this application but the problems starts when i finish using this application. How people closes this application after using it? Please suggest me to some way to exit Silverlight on my Windows Phone.

  2. #2
    Join Date
    Oct 2008
    Posts
    951

    Re: Exit a Silverlight Application

    I guess there is no way to exit the Silverlight Application completely on your mobile phone which is running Windows Phone 7. Though i don't see any need to exit this application as pressing the Back button is enough to come out of this application. I think there would be some tricky ways to exit it completely which by running some programming codes or using some third party application.

  3. #3
    Join Date
    May 2008
    Posts
    5,812

    Re: Exit a Silverlight Application

    At first I considered that unable to quit an application would be a problem. Then gradually realized that when you come on the main screen of your application, you cannot Go Back, I got anxious thinking it as a major limitation. However, the further I think about it, I guess that there is lesser needs for either an Exit or the ability for an application to "Go Back" in order to exit it forcefully. The navigation familiarity on the phone states that the Back button is used not to duplicate this functionality in your application. Users will rapidly grab that applications are like a heap that they can pop things off to go back to the previous application. Alternatively they can use the dedicated button for the same. With these options, I don’t see any requirement to have an exit button.

  4. #4
    Join Date
    Oct 2008
    Posts
    401

    Re: Exit a Silverlight Application

    In the present Beta dev tools for Windows Phone 7, You cannot exit a Silverlight application. But there is one method to exit for XNA apps. At present the finest way to do this is throwing an exception. If you are familiar with the programming concepts then you must be knowing that an unhandled exception kills your application. At the end if you are going to hack it then you should do the same finely. I just know that you have to do some hacking in an App class of a WP7 Silverlight.

  5. #5
    Join Date
    Dec 2008
    Posts
    950

    Re: Exit a Silverlight Application

    I have got the code by using which you can exit the Silverlight application programmatically. You have yo give call as follows.
    App.Quit();
    Following is an implementation of code in App.xaml.cs file:
    Code:
    private class ExitException : Exception { }
    
    public static void Exit()
    {
        throw new ExitException();
    }
    private void Application_UnhandledException(object sender, 
        ApplicationUnhandledExceptionEventArgs e)
    {
        if (e.ExceptionObject is ExitException)
            return;
    
        if (System.Diagnostics.Debugger.IsAttached)
        {
            System.Diagnostics.Debugger.Break();
        }
        //etc.
    }

Similar Threads

  1. How to prevent exit window in OOB mode on SilverLight 4
    By Eric Banadinovich in forum Technology & Internet
    Replies: 3
    Last Post: 17-04-2011, 12:01 PM
  2. How to exit an application in windows phone 7?
    By Garonman in forum Portable Devices
    Replies: 5
    Last Post: 27-10-2010, 12:22 AM
  3. Raise without a handler, Application will exit.
    By Bower in forum Windows Software
    Replies: 5
    Last Post: 15-07-2010, 01:47 PM
  4. When a JFrame Is Closed Exit From an Application
    By Sheenas in forum Software Development
    Replies: 4
    Last Post: 24-02-2010, 11:02 PM
  5. Fatal Application Exit Notification Won't Go Away
    By gabrielconroy in forum Operating Systems
    Replies: 3
    Last Post: 19-05-2009, 08:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,901,365.24435 seconds with 17 queries