1
votes

is it possible to quit my UWP-app and start the core app of Windows IoT?

Right now I use the following code:

private void FlyoutExit_Click(object sender, RoutedEventArgs e)
{
Application.Current.Exit();
}

This does not have the effect I want. When I click the button, my program just restarts. It doesn't exit.

Greetings

1
Have you tried CoreApplication.Exit()?Sasan

1 Answers

2
votes

On Windows IoT Core, the OS will start the application which the user sets as the Startup app. So even you exit the app or the app crashed, the app will restart automatically. If you want to change the running app, you can use Device Portal to change the startup app,or use UpdateStartupAppAsync api in DevicePortalWrapper to call the REST API to change the default app.