What is the Application Lifetime in WPF?

 Posted by Shantanupatel on 3/6/2012 | Category: WPF Interview questions | Views: 1964 | Points: 40

The main events fired from Application include:
* Startup - Application is starting up.
* Exit – Fired when an application is shutting down.
* Activated – Fired when an application gets focus, i.e. becomes the foreground application
* Deactivated – Fired when application loses focus, i.e. is no longer the foreground application
* DispatcherUnhandledException – Fired when an exception is thrown, but not yet handled. You can choose to handle the exception or not
* SessionEnding – Fired when Windows is being shut down–due to either logoff or Windows shutdown. You can cancel the shutdown sequence.
* You can add custom code for any of these events by just overriding the OnEventName method in your Application-derived class, e.g. OnStartup.

Source: Interview | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response