UWP 如何隐藏应用程序? [英] UWP How to hide the app?

查看:48
本文介绍了UWP 如何隐藏应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,它们是隐藏应用程序的一种选择.每当用户单击隐藏应用程序窗口以及任务栏中的应用程序图标时,都应该隐藏.如何在 UWP 中实现这一点?

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?

推荐答案

UWP(尚)不支持此功能.如果您查看 UWP Skype,它与所有其他应用程序一起始终在任务栏中可见.UWP 应用无法自行注册要启动的全局快捷方式.

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.

最小化的 UWP 应用程序在需要/需要时被操作系统挂起,并且无法执行任何工作.如果您隐藏您的应用程序,您将被暂停并且无法执行任何工作.唯一的例外是,如果您请求延长执行时间,您的应用程序将被允许在最小化时运行.它们仍然是限制,但它们是更多的电池/锁屏边界.

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 通用 Windows 平台 (UWP) 应用生命周期

支持你的应用有后台任务

推迟应用暂停扩展执行

这篇关于UWP 如何隐藏应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆