Terminate Method
Collapse the table of content
Expand the table of content

Application.Terminate Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Terminates the current process.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public void Terminate()

This method should only be used in cases where the user is unable to make any useful forward progress such as if the user is presented with an End User License Agreement and declines or if the app requires the user to login and the user can’t provide credentials. Otherwise, apps should not use this method to provide an “Exit” mechanism. The Terminate method does not raise any application lifecycle events. Before you call this method, you must save the state of the app.

Windows Phone OS

Supported in: 8.1, 8.0

© 2019 Microsoft