title: Show image while downloading it, in wpf
body: <p>I download image with below code.</p>
  
  <pre><code>    byte[] buffer = new byte[1024];
  
      HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(url);
      httpRequest.Timeout = 30000;
      httpRequest.Method = "GET";
      httpRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0";
      httpRequest.Accept = "image/png,image/*;q=0.8,*/*;q=0.5";
  
      using (HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse())
      {
          using (Stream responseStream = httpResponse.GetResponseStream())
          {
              MemoryStream memStream = new MemoryStream();
              int bytesRead;
              while ((bytesRead = responseStream.Read(buffer, 0, buffer.Length)) &gt; 0)
              {
                  memStream.Write(buffer, 0, bytesRead);
              }
              memStream.Seek(0, SeekOrigin.Begin);
              return memStream;
          }
      }
  </code></pre>
  
  <p>after download, Show it in WPF Image control.</p>
  
  <pre><code>    BitmapImage bmpImage = new BitmapImage();
      bmpImage.BeginInit();
      bmpImage.StreamSource = memStream;
      bmpImage.CacheOption = BitmapCacheOption.OnLoad;
      bmpImage.EndInit();
  
      backIMG.Source = bmpImage;
  </code></pre>
  
  <p>I want show image while downloading (similar image loading in browsers)
  How can I do this?</p>
  
  <p>(excuse me for bad english)</p>