Win 10 虚拟桌面 [英] Win 10 virtual desktop
问题描述
关于Win 10中的虚拟桌面功能有很多问题,但答案并不令人满意.当我使用 UWP、c# 和 XAML 开发 Windows 10 应用程序时,我找不到使用此功能的方法.我想要实现的行为与典型的 Win 10 应用程序显示的行为相同,比方说:像 Edge.如果您在虚拟桌面 A 上打开 Edge,切换到桌面 B 并从那里启动 Edge,它会自动切换回桌面 A 并显示 Edge 窗口.如何做到这一点:VS 2015、UWP App、c#??
There are a lot of questions about virtual desktop feature in Win 10, but the answers are not satisfying. When I develop a Windows 10 App with UWP, c# and XAML I can't find a way to use this feature. What I like to achieve is the same behaviour that a typical Win 10 App shows, let's say: like Edge. If you open Edge on virtual desktop A, switch to desktop B and start Edge from there, it automagically switches back to desktop A and shows the Edge window. How can this be done with: VS 2015, UWP App, c#??
也许它与单实例应用程序有关.但我正在寻找的是以下问题的答案:- 有多少个虚拟桌面?- 我自己的应用程序在哪个虚拟桌面上?- 如何将我的应用移动到不同的虚拟桌面?
maybe it has to do with single instance applications. But what I am looking for is answers to the following questions: - how many virtual desktops are there? - on which virtual desktop is my own App? - how can I move my App to a different virtual desktop?
问候黑子
推荐答案
Universal Windows 应用程序本质上是单一实例,并在默认情况下获得您要求的行为:
Universal Windows apps are by nature single instance and get the behavior you ask for by default:
从空白模板创建一个新的通用窗口.
Create a new Universal Windows from the blank template.
- 运行应用程序
- 添加一个新的桌面 &切换到它
- 运行应用程序,您将自动切换回第一个原始桌面上的实例.
通用 Windows 应用无法直接查询虚拟桌面或与虚拟桌面交互.
Universal Windows apps cannot directly query or interact with the virtual desktops.
经典 Win32 应用程序可以通过 VirtualDesktopManager 和 IVirtualDesktopManager 界面.
Classic Win32 apps can interact with virtual desktops and move windows between desktops via the VirtualDesktopManager and the IVirtualDesktopManager interface.
这篇关于Win 10 虚拟桌面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!