简体   繁体   中英

How to programmatically suspend app?

How to programmatically suspend app?

App.Current.Exit() closes the app, but how to suspend?

Microsoft does not suggest a way to do this programmatically and I haven't been able to find any documentation on how to suspend the app other than ALT+F4, right-click close from task bar, or minimizing app.

There is no direct way for an app to programmatically suspend itself. You can try launching a file or protocol into another app. That may end up switching fully from your app to the other and suspending yours, but there's no guarantee.

If you're trying to control suspension of another app similar to how Visual Studio does when debugging then take a look at the IPackageDebugSettings interface.

Why do you want to do this? What problem are you really trying to solve?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM