Ok the title is not really explicit but in this post we’re going to see an image control which display the busy pointer that we saw in my previous post, until the image be loaded.
First we create the Xaml composed with two controls: an image and the Busy pointer.
And some C#
I created a Dependency Property for the image’s source. When this DP is changed, I download the image from the source we I display the busy pointer. When the download is complete I stop the animation and hide it.
This control can be really useful if your application uses images from external source like Flickr or Bing.
We could check the ImageFailed event for notifying the user if there is an error.
Live sample: http://broux.developpez.com/public/SL/ImageProgress/index.html (the image is 4MB).