{"id":804,"date":"2019-02-14T19:00:30","date_gmt":"2019-02-14T19:00:30","guid":{"rendered":"https:\/\/ibex.tech\/windows-iot\/?p=804"},"modified":"2019-02-14T19:00:30","modified_gmt":"2019-02-14T19:00:30","slug":"creating-a-custom-preview-window-size","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/uwp-programming-in-c\/windows-and-pages\/creating-a-custom-preview-window-size","title":{"rendered":"Creating A Custom Preview Window Size"},"content":{"rendered":"\n<p>For instance, if you are using say the Rapberry Pi 7&#8243; screen you&#8217;ll want to preview it as a 800 x 480 pixel screen, but there isn&#8217;t one.  To create a new custom size open the following folder in Windows Explorer<\/p>\n\n\n\n<p>C:\\Program Files (x86)\\Windows Kits\\10\\DesignTime\\UAP\\Devices\\1033\\<\/p>\n\n\n\n<p>Copy one of the existing display .xml definition files.<br>Name it, the start of the file name defines its display order in the Visual Studio drop down.  E.g. &#8220;080_7inch_800_480.xml&#8221;<\/p>\n\n\n\n<p>Edit as needed, you have the following attributes:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Name \u2013 name that will be displayed in the list<\/li><li>Width \u2013 physical width of the screen in pixels<\/li><li>Height \u2013 physical height of the screen in pixels<\/li><li>Scale \u2013 scaling factor in percents, must be either 100, 125, 150, 200 or 400<\/li><li>Size \u2013 the diagonal size of the device\u2019s display in inches<\/li><\/ul>\n\n\n\n<p>Finally, we can also define some qualifiers inside the  element:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DeviceFamily qualifier \u2013 can be: Mobile, Desktop, Xbox, IoT, HoloLens or PPI (which stands for Surface Hub)<\/li><li>Orientation qualifier \u2013 pipe-separated list of orientations the device supports (Portrait and Landscape seem to be the only options that are actually reflected in the designer)<\/li><\/ul>\n\n\n\n<p>Save it (you&#8217;ll probably have to save it somewhere else and then copy it into the directory to work around Windows protection).<br>Restart Visual Studio and it will be there to select.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For instance, if you are using say the Rapberry Pi 7&#8243; screen you&#8217;ll want to preview it as a 800 x 480 pixel screen, but there isn&#8217;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, [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[],"class_list":["post-804","post","type-post","status-publish","format-standard","hentry","category-windows-and-pages"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=804"}],"version-history":[{"count":0,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/804\/revisions"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}