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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s