Shuts down an application.
Assembly: PresentationFramework (in PresentationFramework.dll)
Shutdown is implicitly called by Windows Presentation Foundation (WPF) in the following situations:
When a user ends a session and the SessionEnding event is either unhandled, or handled without cancellation.
Calling Shutdown explicitly causes an application to shut down, regardless of the ShutdownMode setting. However, if ShutdownMode is set to OnExplicitShutdown, you must call Shutdown to shut down an application.
This method can be called only from the thread that created the Application object.