Windows Phone 8.0 - Progress-Helper



This WP8.0 Progress Helper assembly is used to display progress feedback using the built-in WP progress-bar using a separate thread to avoid visual stalls.

This is one of my first WP8.0 assemblies used to help ease development on Windows Phone. I will be adding additional WP8.0 assemblies in the near future.

I use a default namespace string for all helper assemblies, making it easier to organize and locate assemblies within projects. Each helper assembly will be marked with the following default namespace:"BenScharbach.WP8.Helpers", with the actual namespace's specific name at the end of the default namespace; for example, 'WPProgressHelper' for this assembly.

Windows Phone 8.0 SDK contains a ProgressIndicator class to communicate with the visual bar at the top of the phone. This built-in bar, located at the top of the phone, allows communication for iteration operations to the end-user.

The ProgressIndicator in Window Phone requires a fully non-blocked UI mode in order to see progress updates in real-time. Consequently, this requires any calling code to use a separate thread to run their progress iteration tasks. Communication to this ProgressIndicator then must be done through the UI dispatcher thread to achieve the real-time updates end-users demand.


To use this helper, create the Progress{generic} instance and pass in the collection of {generic} items via the constructor. Now simply iterate the collection in C# using the Items method call, which will then take care of the per index calls to the ProgressIndicator within the phone.

Note: The calling code should have a thread created; otherwise, the UI updates will be blocked. In a future update, this requirement will be handled by the Progress{generic} class helper.

Thanks,
Ben Scharbach