Is it possible to change the default screen resolution list in the Visual Studio Simulator for Windows 8 apps?
Asked
Active
Viewed 4,830 times
2 Answers
14
The simulator looks for additional resolution configurations using the following pattern
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Simulator\12.0\HardwareConfigurations\HardwareConfigurations*.xml
So if you copy the following XML into a file called HardwareConfigurations-SurfacePro3.xml
in that folder (you need administrator rights) you get an extra entry in the list allowing you to simulate running on a Surface Pro 3.
<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfHardwareConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<HardwareConfiguration>
<Name>12-2160x1440</Name>
<DisplayName>12" 2160 x 1440 (3:2, 140%)</DisplayName>
<Resolution>
<Height>1440</Height>
<Width>2160</Width>
</Resolution>
<DeviceSize>12</DeviceSize>
<DeviceScaleFactor>140</DeviceScaleFactor>
</HardwareConfiguration>
</ArrayOfHardwareConfiguration>

Jesper Larsen-Ledet
- 6,625
- 3
- 30
- 42
-
1this works for me, strange thing is that even MS employees claims that this can be done - http://stackoverflow.com/a/27008949/351383 – Antonio Bakula Dec 20 '14 at 14:00
-
1The simulator is a WPF app so I used Snoop to find the DataContext for the dropdown. Then I used JustDecompile to look around the code to find out where the contents came from. You can also add them to a config section in Microsoft.Windows.Simulator.exe.config if you like. FWIW you cannot extend the list in the device pane in Visual Studio 2013 as that list is hard-coded. – Jesper Larsen-Ledet Jan 05 '15 at 08:07