read

I’m working on a project at the moment that needs to run on a Surface Pro 3. During testing there were some weird redraw issues that only appeared on the Surface 3.   We were unable to reproduce this in our dev environments because  the simulator that comes with Visual Studio doesn’t have a screen size that is compatible with the Surface 3.

For reference, the surface 3 has these specs:

  • Screen Size: 12″
  • Resolution: 2160×1440
  • Scaling Factor: 140%

But fortunately, it turns out you can actually create your own profiles for any device you want in the simulator. Basically you just create an XML file to describe the screen settings and then put into a directory to be picked up by the simulator when it starts.

Step 1: Create a xml configuration file that describes the resolution

It should look like this (the content is pretty self explanatory):

 Step 2: Put the file in a location for the simulator to use it

The file name needs to start with HardwareConfigurations. For example, HardwareConfigurations-Surface3.xml

Put the file in the directory:

(You may need to create the HardwareConfigurations directory).

Step 3: Win!

Restart the Simulator, select the new device and you’re good to go!

ScreenSizeMenu

 

Kym

Mobile, Xamarin, Windows Store Apps, Agile -- I love 'em all! Check out more


Published on

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Kym Phillpotts

I write about Xamarin Forms, mobile development or whatever else I might be concentrating on.

Back to Home