Skip to content Skip to sidebar Skip to footer

How To Exit Or Close An Javascript Uwp App Programmatically? (windows 10)

I made a game and it needs it own exit button. I was not able to use the CoreApplication.Exit() static method here. There is no CoreApplication class in Windows.ApplicationModel.Co

Solution 1:

CoreApplication.Exit is provided only for testing purposes. If you want to exit app you can close current window

    window.close();

Important note (from MSDN): If you use window.close, it appears as a crash to the user and is logged as a crash in the developer’s telemetry data on the Windows Store dashboard.

If you want to proactively "crash" app - you should use the terminateApp method.

Post a Comment for "How To Exit Or Close An Javascript Uwp App Programmatically? (windows 10)"