Geek Library for Windows Phone 7 is live!

At last my very first app for Windows Phone 7 has gone live! Its actually a major milestone for me as not only have I actually finished something, but its my first every release of something into a public marketplace (apart from my kids of course…).
I’ve really enjoyed developing this, trying to use it as a learning experience for developing with Silverlight for Windows Phone 7 and putting in as many bells and whistles as I could. The fact that it passed certification first time shows the effort I put in!
I’ve included the marketplace spiel below and a link to try the free trial, so please give it a go and let me know what you think! I’ll be fully supporting and updating the app so any feedback is much appreciated!
Here you go:

Geek LibraryGeek Library helps you to keep track of your entire library of books, movies, music and video games on your phone and optionally backed up to the cloud.  Scan an item or search a huge online database and pull back cover art and details. Add the item to your library or add it to a wishlist and keep track of the best deals available. Rate your stuff, update the details and add your own cover art if you want.

Here is a list of what you can do with your very own Geek Library:

* Sync to/from the cloud
* Supports multiple languages and locale switching for getting deals from different territories
* Mark things as up for sale/sold/loaned to a friend
* Keep a playlist of things you haven’t read/played
* Rate all your items
* Quickly see loaned items and who has them!
* Fast app switching

Coming soon:

* A desktop client that syncs between the cloud and your phone
* Selling items direct from the app
* Live tiles straight to your playlists

Performance progress bar not displaying after updating to Mango

I’ve been busy over the last few weeks trying to finish my Windows Phone 7 app and recently decided to take the plunge and update it to run on the upcoming Mango release.

Surprisingly I haven’t had too many problems. The only thing that caught me out was remembering to also recompile all the various utility dlls that I had included in my solution and forgot that I was still using! For example, I had included in my solution the Silverlight ZXing, so I had to download the source for that and upgrade it to 7.1.

One thing that did catch me out was that after upgrading everything to 7.1, my performance progress bar (installed from the Augustrelease of the Silverlight Toolkit for Windows Phone) had stopped displaying when the app was busy doing something.

I use the performance progress bar bound to a property in my view model and toggle the display through raising property change events on the property. Everything else was updating correctly just the performance progress bar wasn’t. It turns out that this is a bug in the August release of the toolkit with the performance progress bar and will be fixed in a future release.

To temporarily get around this and fix this I added the following code in the page loaded event in my code behind for my view to reset the binding on the performance progress bar once the view had loaded.

// Following code is required to fix bug in Windows Phone Toolkit - August 2011 
if (progressBar != null)
{
     progressBar.SetBinding(PerformanceProgressBar.IsIndeterminateProperty, new Binding("Busy"));
}

This basically rebinds the IsIndeterminate property of the progress bar to the property in my view model called “Busy”. After doing that the performance progress bar shows/hides correctly.

Binding an MVVM Command to a listbox item

If you are trying to bind a Command to a listbox item that is on a View bound to a ViewModel, you may have been banging your heard trying to work out why the Command wasn’t firing ( I was anyway! ). The problem is that Silverlight is trying to find the Command in the context of the control within which it is bound. So in my instance, it was trying to find the Command within the ItemSource of the listbox, rather than looking in the ViewModel which is where definition for my Command exists.

Fortunately, I’m using the MVVM Light Toolkitframework  for my MVVM implentation in my Windows Phone 7 app. This has a really simple feature where you can find the ViewModel through a ViewModelLocator, so the binding on my EventToCommand becomes:

<GalaSoft_MvvmLight_Command:EventToCommand
Command="{Binding Source={StaticResource Locator}, Path=Main.DeleteCommand, Mode=OneWay}"/>

where Main is the name of my ViewModel. Simple!