title: WPF Refreshing Images (Cache Problem)
body: <p>I have a big problem with loading an image dynamically in my applikation. When i start the applikation the placeholder image source is empty. when i click on a button an image is created and loaded as the placeholder source. when i click again a new image is created but the old image is shown. The creation of the image works perfect. The files on my disk are the files they should be.</p>
  
  <p>The following function is setting the source of the image placeholder.</p>
  
  <pre><code>public void setImage(string path)
      {
          BitmapImage img = new BitmapImage();
          img.BeginInit();
          img.UriSource = new Uri(path, UriKind.Relative);
          img.EndInit();
  
          //Set Refreshing Options
          img.CacheOption = BitmapCacheOption.None;
          img.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
  
  
          placeholder.Source = img;
      }
  </code></pre>
  
  <p>The two options BitmapCacheOption and the BitmapCreateOptions dont change anything.</p>
  
  <p>Can anybody of you help me?</p>