Enabling UEFI booting on a BIOS installed Windows

Just a short article this one. I just got a new motherboard that support UEFI after a long time with my old one. I didn’t want to reinstall Windows at this point and it did a great job of detecting all of the new devices and just booted no problems.

However I would like to take advantage of Windows’ ability to UEFI boot and use the Secure Boot feature on Windows 8. There is no supported way to migrate from BIOS booting to UEFI but it is possible to do it. This isn’t for the faint of heart and it’s always possible when messing around with things like this that it’ll leave you in an unsupported state or completely broken and require a rebuild.

It did work for me though. Check out this great article http://social.technet.microsoft.com/wiki/contents/articles/14286.converting-windows-bios-installation-to-uefi.aspx for the instructions.

Function lock for the Microsoft Wedge keyboard

I’ve just purchased a Microsoft Wedge keyboard for my Dell Venue 8 Pro. It’s a really nice keyboard but it has one big flaw for my use, the F keys are on a function shift (Fn) which means when programming I have to hit Fn-F2 to get F2 and not volume mute.

Fortunately it’s a fairly easy fix thanks to a great bit of software called AutoHotkey. This software lets you remap keyboard keys to others, run macros, build basic UIs, hotstrings and much more, it’s rather nice.

Using Grids with ItemsControl in XAML

ItemsControl in XAML is a useful control that allows you to bind against multiple items and have them displayed using a repeating template (or templates). It forms the basis of the ListBox and other controls but can be used on its own where extra behaviour such as selection is not needed.

By default the ItemsControl uses a vertically aligned StackPanel as the layout panel for its items but you can override this by providing a template. It’s quite common to override this for example to use a VirtualizingStackPanel but in this instance I wanted to use a Grid for layout.

Dynamic SQL scripting on Windows Phone 7 with LINQ

I recently had cause to look into running dynamic SQL on WP7 for a customer. On a desktop this is easy, you just run some SQL statements through ADO.NET and you’re sorted. On Windows Phone 7 it’s a little trickier. This is because WP7 only exposes LINQ to SQL and it doesn’t support arbitrary SQL execution against your SQL CE databases.

So how to handle it when you have a corrupt DB and want to send a fix to a remote device or you just want to update the DB with some new data.

Connecting to SharePoint on Office 365 with Windows Phone 7

One of my colleagues recently asked me to look into connecting to a SharePoint site running on Office 365 from a Windows Phone 7 application. Now this is something that the phone has native support for but in this case he wanted to be able to build an application that had added functionality and then called into the SharePoint web service APIs to extract data from SharePoint.

Simulated Push Notifications on Windows Phone 7

I’m currently prepping for my TechEd Europe WP7 session and I like to prepare for the worst. My demo relies on some cloud services and also on WP7 push notifications. Push notifications are nice but they have one drawback for demos, I need an internet connection.

Now in the real world my application would indeed need an internet connection or it would actually be kind of useless, but in demoland I don’t need one as I can run the cloud services portion in the Azure DevFabric which is nice in case the internet connectivity in the demo room goes down, I have a backup.

The same isn’t true of push notifications, they are managed by Microsoft and if I can’t get to them I can run my demo even though my own cloud services are running locally. In order to get around this I wrote a simple WCF service that also runs in my Azure DevFabric along with my other services that can act as a push notification endpoint. It’s not totally seamless but it works quite nicely for me as I now have a fallback for push notifications as well as for my own cloud services.

Silverlight Navigation With the MVVM Pattern

I recently had a query from a customer that was one of those ones that you think “Aha! That’s easy, you just do this”. Then you think a bit more about it and realise that if you want to do it properly it’s not quite as simple as you first thought.

This particular query related to how to use the navigation framework introduced in Silverlight 3 with the MVVM pattern. For those that don’t know the Model-View-ViewModel pattern is a common pattern often used to build Silverlight and WPF applications since it has strong support for databound UIs and provides good abstraction for unit testing and keeping your view logic separate from the view and the model.