For instance, if you are using say the Rapberry Pi 7″ screen you’ll want to preview it as a 800 x 480 pixel screen, but there isn’t one. To create a new custom size open the following folder in Windows Explorer

C:\Program Files (x86)\Windows Kits\10\DesignTime\UAP\Devices\1033\

Copy one of the existing display .xml definition files.
Name it, the start of the file name defines its display order in the Visual Studio drop down. E.g. “080_7inch_800_480.xml”

Edit as needed, you have the following attributes:

  • Name – name that will be displayed in the list
  • Width – physical width of the screen in pixels
  • Height – physical height of the screen in pixels
  • Scale – scaling factor in percents, must be either 100, 125, 150, 200 or 400
  • Size – the diagonal size of the device’s display in inches

Finally, we can also define some qualifiers inside the element:

  • DeviceFamily qualifier – can be: Mobile, Desktop, Xbox, IoT, HoloLens or PPI (which stands for Surface Hub)
  • Orientation qualifier – pipe-separated list of orientations the device supports (Portrait and Landscape seem to be the only options that are actually reflected in the designer)

Save it (you’ll probably have to save it somewhere else and then copy it into the directory to work around Windows protection).
Restart Visual Studio and it will be there to select.

We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.