简体   繁体   中英

Win 10 virtual desktop

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#??

EDIT: 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?

Regards Heiko

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.

  1. Run the app
  2. Add a new desktop & switch to it
  3. Run the app and you'll automatically switch back to the first instance on the original desktop.

Universal Windows apps cannot directly query or interact with the virtual desktops.

Classic Win32 apps can interact with virtual desktops and move windows between desktops via the VirtualDesktopManager and the IVirtualDesktopManager interface.

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