First Simple App for Windows Phone 8

Having had my Windows Phone for a couple of months now, and having set up a Windows 8 virtual machine to do some app development, I finally decided to sit down and bang out a simple app, to see how easy it is.

To be honest if your skill set follows the form of C#, WPF/Silverlight you won’t have many problems at all. You will need to have Visual Studio 2012 and the Windows Phone 8 SDK installed, but thats a fairly easy (but somewhat lengthy!) process to complete.

As I do a fair amount of driving and tutor Advanced Driving, for my first app I decided to put together a Stopping Distance calculator. I’ve done these for Android and BlackBerry, so thought I would do it for Windows Phone as I have all the calculations to hand.

The idea of the calculator is a simple one. Supply your speed in Miles per Hour or Kilometres per Hour and it will calculate the Braking Distance, Thinking Distance and the overall Stopping Distance (Thinking+Braking). I’ve added a couple of screen shots below of the app running in the emulator. It certainly seems to run fine, and the whole process of developing it from start to finish was about 2 hours. Not bad for a first app.

Screen 1 – Inputs

The inputs into the app are very simple, your speed and from the list, select your unit of measure (MPH or KPH). This is a list picker and will expand when you want to make your selection and then contract when you have made the selection. Simply then tap the Calculate button and you are taken to the results page showing the calculation results.

App Screen 1Screen 2 – Results

The Thinking Distance, Braking Distance and overall Stopping Distance is then displayed with the results in metres and feet. You can then tap another button to take you back to the input screen to allow you to calculate using another speed/unit of measure.

app screen 2

A far from complicated app, but someone going through a driving test, or Advanced driving test does need to know stopping distances. A simple little app that can aid revision of stopping distances.

I think I’ll tidy up the screens, make them a little more visually appealing and then upload to the Windows Phone App Store.

Advertisements

Visual Studio 2012 Error: No exports were found that match the constraint in…

I use a Windows 8 Virtual Machine for any Windows Phone 8 app development I do. I hadn’t fired up my VM for quite a while and there were a whole host of Windows updates to be installed.

After installing the updates and running Visual Studio 2012, I tried to load one of my Windows Phone App solutions. When trying to view any of the pages in Visual Studio, I received the error:

No exports were found that match the constraint:
ContractName
Microsoft.VisualStudio.Project.IProjectServiceAccessor
RequiredTypeIdentity
Microsoft.VisualStudio.Project.IProjectServiceAccessor

Very annoying considering that before the updates were installed everything worked fine. To overcome the issue, what you can do is delete the folder ComponentModelCache, which can be found in this path:

C:\Users\<<user>>\AppData\Local\Microsoft\VisualStudio\11.0\ — where <<user>> is the users folder.

This has worked fine for me and looking at Google, has worked for many other people.