Testing Application on various screen resolution(s).


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.

 

 

Comments (0)

Skip to main content