title: WPF Image source doesn't update image
body: <p>I'm trying to have a rotating ad display in my WPF application. When I load the application the GetNewAd() method properly displays the advertisement. When I try to update the ad by calling my GetNewAd() method again, the chatHost is returning the new ad, but the image does not update in the UI. I have tried updating the image without the animation, but I still have the same problem. What am I missing here?</p>
  
  <pre><code>public class ncWindow
  {                   
      public ncWindow(Grid grid)
      {           
          imgAd = new Image();
          imgAd.Margin = new Thickness(2,2,2,2);
          imgAd.HorizontalAlignment = HorizontalAlignment.Left;   
          imgAd.MouseDown += imgAd_MouseDown; 
  
          adTimer.Interval = 60000;
          adTimer.Elapsed += adTimer_Elapsed;
          adTimer.AutoReset = true;   
          adTimer.Start();
  
          grid.Children.Add(imgAd);       
      }                   
  
      public void GetNewAd()
      {
          DisplayedAd = chatHost.GetNewAd();
  
          debug.Print("GetNewAd: " + DisplayedAd.VendorName + ", ImageData.Length = " + DisplayedAd.ImageData.Length);
  
          BitmapImage image = new BitmapImage();
          if (DisplayedAd.ImageData!=null &amp;&amp; DisplayedAd.ImageData.Length&gt;0)
          {
              using (var mem = new MemoryStream(DisplayedAd.ImageData))
              {
                  mem.Position = 0;               
                  image.BeginInit();
                  image.CacheOption = BitmapCacheOption.OnLoad;
                  image.StreamSource = mem;               
                  image.EndInit();            
              }
          }   
          else
              return;
  
          image.Freeze();         
          imgAd.Source = image;
      }       
  
      private void adTimer_Elapsed(object source, ElapsedEventArgs e)
      {
          GetNewAd();
      }
  }    
  </code></pre>