Reputation: 14700
I am starting work on an app that is designed to run on a Windows 10 desktop with multiple monitors (From 1-3), and I want the app to scale accordingly, opening separate windows, full-screen (ideally) or maximized (if necessary) on each monitor, each with a different View shown.
From what I could see, UWP isn't naturally geared towards such a scenario. I've managed to launch several secondary windows using CoreApplication.CreateNewView
, but ApplicationViewSwitcher.TryShowAsStandaloneAsync
doesn't allow me to specify on which monitor the view will open (in fact, it won't allow me to specify the window location at all), and ProjectionManager.StartProjectingAsync
, while allowing me to specify the monitor to project to, doesn't really play well with projecting multiple views to multiple monitors at once.
Is there a better technique to achieve this in UWP? Or is WPF still the preferred technology for this sort of scenario?
Upvotes: 4
Views: 2161
Reputation: 2275
According to this UWP sample, using "Shell Launcher V2" to configure the machine as a kiosk will allow you to display each view of a UWP app on separate monitors:
It states:
Have multiple views for the shell UWP app. Shell Launcher V2 defines that for the shell UWP app, its first view is displayed on main monitor, 2nd view will be on left-most monitor, 3rd view will be on 2nd to left monitor and so on. If there is only one monitor, only the main view gets displayed.
You then use ApplicationViewSwitcher.TryShowAsStandaloneAsync()
(example) to show the second view on the second monitor.
Upvotes: 0
Reputation: 32785
Is there a better technique to achieve this in UWP? Or is WPF still the preferred technology for this sort of scenario?
Currently, ProjectionManager
only support to sent windows (app views) to secondary displays, and swaps main and projection views. It only limited the operation of two monitors.
For UWP, you could launch several secondary windows using CoreApplication.CreateNewView
and drag them to different monitors manually. Obviously, it is not best practice.
This is a good requirement, If you do want this feature, you are welcome to ask on UserVoice.
Upvotes: 4