title: How to display progress bar in windows phone 8 for images sourced from the web?
body: <p>I have a list of URIs of images on Flickr. I use gestures in the Windows phone Toolkit to display images and handle the flick event. Since the images are on the web the source is set fine, but the progress bar collapses (hides) immediately on flick since it has already set the source of the image and phone still has to download and show it.   </p>
  
  <p>I wish to display the progress bar until the image is fully visible. (is using a WebClient useful?)</p>
  
  <p>Here is a simple video to show exactly what is happening. Don't mind the pictures, I just picked up the first thing which came up.</p>
  
  <p><a href="https://www.youtube.com/watch?v=6rAytiKgXwU" rel="nofollow">Video Link</a></p>
  
  <p>The code is below:</p>
  
  <pre><code>  private void GestureListener_Flick(object sender, FlickGestureEventArgs e)
                  {
                      if (((e.Angle &lt;= 180 &amp;&amp; e.Angle &gt;= 135) || (e.Angle &lt; 225 &amp;&amp; e.Angle &gt; 180)) &amp;&amp; e.Direction.ToString().Equals("Horizontal"))
                      {
                          progess_bar.Visibility=Visibility.Visible;
                          if(index&lt;photoslist.Count-1)
                          index++;
                          image.Source = new BitmapImage(new Uri( photoslist[index].LargeUrl , UriKind.Absolute));
                          progess_bar.Visibility = Visibility.Collapsed;
                      }
                      else if (((e.Angle &lt;= 45 &amp;&amp; e.Angle &gt;= 0) || (e.Angle &lt; 360 &amp;&amp; e.Angle &gt;= 315)) &amp;&amp; e.Direction.ToString().Equals("Horizontal"))
                      {
                          progess_bar.Visibility = Visibility.Visible;
                          if (index &gt; 0)
                              index--;
                          else
                              index = 0;
                          image.Source = new BitmapImage(new Uri( photoslist[index].LargeUrl, UriKind.Absolute));
                          progess_bar.Visibility = Visibility.Collapsed;
                      }
                  }
  </code></pre>