Simulating Surface Pro 3 in the Simulator

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×1330
  • 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):

<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfHardwareConfiguration xmlns:xsd=""
        <DisplayName>Surface Pro 3 - 12" 2160 x 1440 (3:2, 140%)</DisplayName>

 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:

C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Simulator\12.0\HardwareConfigurations\

(You may need to create the HardwareConfigurations directory).

Step 3: Win!

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



Xamarin Link Roundup #6


Cool Posts

Code & Components



Xamarin, iBeacons and Geofencing – Some Resources

For an upcoming geekend (a weekend hackfest) we are looking at spending some time digging into iBeacon and Geofencing technologies.  I was going to email some of these resources I have found to the participants but thought it might be better if I blog them as a resource for others. 

Hope it helps

Continue reading…

Xamarin and iOS – Moving to iOS 7 and Xcode 5

Apple has now decreed that all apps submitted to the store must be built on XCode5 and iOS7.

And so it shall be…

So I’ve started building our Xamarin iPhone project against said platforms. Now there is a lot of redesign that should go on with moving to iOS 7, but to tell you the truth we went for a pretty flat design to begin with, so the first port of call is just migrating straight across and getting certified as an iOS 7 app.  Once we have that done, we can spend time taking advantage of more iOS 7 features




The transition has been surprisingly smooth and there have only been a few issues (so far).

1. Content disappearing behind Navigation Bar

I found in some places the content of my views were being pushed up underneath the navigation bar.   This is because in iOS 7 view controllers use full screen layout.  In my case I wasn’t going to redesign the UI at this point to handle things differently so to get around this I just set the value for EdgesForExtendedLayout to None in the ViewDidLoad of the UIViewControllers, like so:

public override void ViewDidLoad()
EdgesForExtendedLayout = UIRectEdge.None;




There is more information available on the Apple iOS 7 UI Transition Guide.


2. Button Labels being trimmed with ellipsis (…)

Now that buttons are so cool they don’t need chrome or borders anymore I noticed that I was getting some trimming of text happening on button labels. Like this:


After much slapping of forehead I discovered that the cause was that I was setting the UILabel.Appearance.Font property in theAppDelegate’s FinishedLaunching .  This global change was enough for iOS 7 to think that C…cel looked much better than Cancel.  Get rid of that and viola, iOS 7 is happy because it has full control again 😉


3. Your UISwitch custom background images are gone!

Those pretty custom backgrounds you created for your UISwitch are no longer functional.  Not a biggy really, however, I also noticed that if your BackgroundColor of your UISwitch is set to UIColor.Clear you get a nice “Googely Eye” effect when you toggle your buttons.


Is it on, is it off… who can tell.  Anyway, looks like it’s time to bow down to iOS and let it run the show. So get rid of your UIColor.Clear!


I’ll let you know of any more issues I have as I do a basic port to iOS 7.  Till then anyone else got any other war stories they want to share?



Xamarin and Android – Specific Solutions to Specific Problems #4


It’s been a while but I’m finally back with another one of my recent discoveries while working with Xamarin and Android. We are at the pointy end of our project so it has been hard to find the time to blog but luckily now that I do have some, I also have a lot of material banked up. Stay tuned…

I have list view inside a scroll view and I want to be able to be able to scroll both depending on which one I am touching.

In order to support devices with small screens, sometimes I resort to lazy man’s responsive design. I wrap the whole layout in a ScrollView element. While this works fine most of the time it does have an interesting time dealing with child elements that are also scrollable. The one I run into the most is the existence of a ListView inside a ScrollView.

Continue reading…

"Find was stopped in progress" while performing search in Visual Studio

This issue has been plaguing me for some time and I usually just work around it but today I finally found a fix. It has happened in Visual Studio 2010, 2013 and today it started occurring in 2013 RC. I found a fix in this Microsoft Connect thread and thought I would blog it as a few of the other guys at work had also encountered it from time to time.

I don’t know if this is the “official” fix but the following worked for me:

1. Find in Files for any search string.

2. As soon as it starts searching spam Ctrl – Scroll Lock.

3. Win

Xamarin and Android – Specific Solutions to Specific Problems #2

Welcome to the second post in my Specific Solutions to Specific Problems series. Hopefully somebody is getting some benefit out of these but even if nobody is reading it, the process is pretty cathartic anyway…

These are a handful of issues that I encountered in my second week on Monodroid. These are the solutions I discovered to my problems.

Continue reading…

Getting a look into AngularJS, a link roundup – 1st September 2013

I recently had to do a technical evaluation of technology options for a new project/product that we’re embarking on. The project was to be a web application, and since we’re not really a ‘web’ shop our options were really open for what and how we were going to design and build this new system.

So with our options open we began to evaluate things like Backbone, knockout and Ember. However we wanted to try and stick with an MVVM-esk pattern… well this led me down a path of discovery with AngularJS. What we found was a really capable and fast moving world unlike anything I’ve seen for a long time!

Here are the most useful things on the inter-nerd, that will teach you the KEY concepts in a few days.

Continue reading…