How to highlight current file in Solution Explorer

To highlight the current open file in Visual Studio’s Solution Explorer you must enable the ‘Track active item in Solution Explorer’. To enable this follow these simple steps:

  1. In Visual Studio 2010 click on the Tools menu
  2. Select Options
  3. Select Projects and Solutions
  4. Select General
  5. Tick ‘Track active item in Solution Explorer’
  6. Click OK

VS2010 File Highlighting in Solution Explorer

Windows 8: WinRT Error – The given System.Uri cannot be converted into a Windows.Foundation.Uri

I was trying to directly set the source of an image to the path within the assembly. Previously you built up the Uri to include the assembly name and the path to the asset. Just like below but this now throws an error.

            // ;Component/ must all ways be present in the Uri below
            Uri uri = new Uri("VJComponent;Component/Assets/joystick.png", UriKind.Relative);
            BitmapImage bi = new BitmapImage();
            bi.UriSource = uri;

The given System.Uri cannot be converted into a Windows.Foundation.Uri

Replace the assembly name and ‘;Component/’ with ‘ms-appx:/’ and build the Uri as before.

            Uri uri = new Uri("ms-appx:/Assets/joystick.png");
            BitmapImage bi = new BitmapImage();
            bi.UriSource = uri;

To do the same but directly in the XAML instead of doing it programmatically you previously did this

Again replace the assembly name and ‘;Component/’ with ‘ms-appx:/’ and build the Uri as before.

Windows 8 Developer Camp Slides

Here are the slides from the Windows 8 Developer Camp I recently attended

[gview file=”” authonly=”1″]

[gview file=”” authonly=”1″]

[gview file=”” authonly=”1″]

[gview file=”” authonly=”1″]

[gview file=”” authonly=”1″]

[gview file=”” authonly=”1″]


Create WinRT Component DLL in C#

There are loads of tutorials on how to create a WinRT Component DLL in C++ but there aren’t many on how to do this with C#. In fact it is pretty simple:

Step 1: Add a C# Class library project to your solution

Step 2: Right click on the new project you have just added and go to properties.

Step 3: Change the output type from ‘Class Library’ to ‘WinMD File’.

Change from Class Library

Change to WinMD File

Step 4: Ensure your class inside the newly created Class Library is sealed. The Windows Runtime classes you create must be sealed.

Make sure you set your class to sealed

HTML5 – My adventures….

So I have been keeping an eye on HTML5 for a while now. I am pretty confident using Javascript (hey I wrote close to 500k lines for a Silverlight 1.0 project). I am not going to shift away from C#/XAML as I honestly believe they are my bread and butter, but there is no harm in having a play with HTML5.

I like the MVVM pattern as I feel my code is cleaner. I guess it’s because I feel comfortable with it but it’s great to see KnockoutJS being adopted to allow this pattern into the HTML5/JS world.

I have started using KineticJS today to start and again I am impressed with it.

Windows 8: MVVM and SettingsPane issue?

Today I reported to Microsoft that there appears to be an issue with the SettingsPane in Metro apps built using the MVVM pattern. The app throws an ‘System.AccessViolationException’ throws when you call SettingsPane.Show();

I have emailed over the code to Matt Small (Microsoft) and hopefully I will hear back shortly.

Google Drive Is Live – 5GB storage!

I have always like Google products and I have high hopes for Google Drive. I have been using Dropbox for a while now and I love it but I need more space. It looks like Google and Microsoft (Skydrive) have saved me a few pounds! Thanks!

Below are the screen grabs from my Google Drive install. The install was very quick on my Windows 7 laptop. No reboot was required.

Step 1: Go to and click sign up.

Step 2: Accept the Terms of Service.

Google Drive Terms

Step 3: Let the Google Drive installer download the files it needs.

Google Drive Download

Step 4: Sign into your Google Account.

Google Drive Sign In

Step 5: Click close once the installation has been complete.

Google Drive Install Complete

Step 6: Click next on Google Drive wizard.

Google Drive Wizard

Step 7: For default installation click ‘Start sync’ or click ‘Advanced setup’ to specify your installation.

Google Drive Wizard

Step 8: Configure and click ‘Start sync’ once you are complete.

Google Drive Wizard Advanced

Step 9: In the Notification area on the task bar (by the clock) look for the Google Drive icon and right click to access your Google Drive menu.

Google Drive working in taskbar

Windows 8 Boot Camp – Day 2

On the second day of the Microsoft Windows 8 Boot Camp we continued on with the Contoso reference app that we started building on Day 1. This covered aspects like search and share contracts, notifications (tile AKA live tile, badge and toast) and getting the app ready for the Windows 8 app store.

Again the app store lab was the most informative and was the one most people seemed interesting in. Surely Microsoft need to look at the feedback and start addressing this. The other general feel I got was people who had the skill sets to develop apps that Microsoft are crying out for wanted access to tablets. Microsoft can you please send me one?! :-p

The event was held at the awesome Paramount tower in central London. It gives some great views over London’s skyline. These are a few pictures I took on my phone.


Windows 8 Account types

To use Windows 8 you must have an account to log in with. There are 3 types of accounts on Windows 8.

  1. Local Accounts – These are local accounts only accessible on the local device.
  2. Domain Accounts – These are accounts created and controlled by Active Directory.
  3. Microsoft Accounts – Previously known as Windows Live ID. These accounts sync your settings with any machine you log into.

For further details on Microsoft Accounts you will find this post interesting –