Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community
Testing Application on various screen resolution(s).
Published Jan 15 2019 02:12 PM 7,314 Views
First published on MSDN on Aug 18, 2017
We know that one of the main feature of the UWP application is effective pixel and scaling. UWP apps automatically adjust the size of controls, fonts and other UI element so that to interact with on all devices.  When you run the app on device, the system uses and algorithm to normalize the way UI element display on screen. As developer its not easy to carry multiple devices to test UWP on all screen sizes.  You may also need to test your desktop bridge converted app on multiple screen sizes to understand the behavior of UI when screen size change.  WPF app does not auto scale and its imminent that we know exactly how the app behave when the screen size change.  In short we requires to scale on multiple resolution (up & down) while testing app.

You can simulate multiple screen size using virtualization.  The first step is to create windows 10 Hyper-V machine. You also want to ensure that you host the virtual machine on system with GPU and enough memory to dedicate to the video.

Steps to create virtual machine for multiple resolution testing of UWP app(including High DPI).

  1. Go to the configuration of the VM and add RemoteFX 3D Video Adaptor. Specify the maximum resolution of the monitor and the dedicated video memory.

  2. Apply the settings on the VM and restart the Virtual machine.

  3. In the Hyper-V Server settings enable check box "Allow enhanced session mode" . Do the same in the user setting.

4. Ensure that the correct GPU is used by the RemoteFX

5. Right click on the Virtual machine you want to connect to  and click on "Edit Session Settings"

6. Select the display resolution and click on connect. Install your app in the Virtual machine and test it for resolution.  You can reconnect to the same virtual machine using different resolution by repeating step 5 and step 6.

Version history
Last update:
‎Nov 22 2022 12:24 PM
Updated by: