UWP How to hide the app?

匆匆过客 提交于 2020-01-15 03:55:15

问题


In my application their is one option to hide the app. Whenever user clicks on hide the app window as well as the app icon from task bar should be get hidden. How to achieve this in UWP?


回答1:


This feature is not supported (yet) on UWP. If you look at the UWP Skype, it always remain visible from the taskbar along with all the other apps. A UWP app cannot register by itself a global shortcut to be launched.

Minimized UWP applications are suspended by the OS when it wants/needs and will not be able to perform any job. If you hide your application you will be suspended and will not be able to perform any work. The only exception being if you request an extended execution time, your application will be allowed to run while minimized. They will still be limits but they are more battery/lock screen bounds.

If you really want to hide your app, you should just close your app window and rely on some background tasks to perform the work you might want to do when hidden/stopped.

This should be a good reading:

Windows 10 universal Windows platform (UWP) app lifecycle

Support your app with background tasks

Postpone app suspension with extended execution



来源:https://stackoverflow.com/questions/46783071/uwp-how-to-hide-the-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!