title: WPF Dispatcher {"The calling thread cannot access this object because a different thread owns it."}
body: <p>first I need to say that I´m noob with WPF and C#. 
  Application: Create Mandelbrot Image (GUI)
  My dispatcher works perfectly this this case: </p>
  
  <pre><code>  private void progressBarRefresh(){
  
         while ((con.Progress) &lt; 99)
         {
             progressBar1.Dispatcher.Invoke(DispatcherPriority.Send, new Action(delegate
                  {
                      progressBar1.Value = con.Progress;
                  }
                ));
         }
    }
  </code></pre>
  
  <p>I get the Message (Title) when tring to do this with the below code: </p>
  
  <pre><code>bmp = BitmapSource.Create(width, height, 96, 96, pf, null, rawImage, stride);
  
  this.Dispatcher.Invoke(DispatcherPriority.Send, new Action(delegate
              {                     
                  img.Source = bmp;
                  ViewBox.Child = img;  //vllt am schluss
              }
            ));
  </code></pre>
  
  <p>I will try to explain how my program works. 
  I created a new Thread (because GUI dont response) for the calculation of the pixels and the colors. In this Thread(Method) I´m using the Dispatcher to Refresh my Image in the ViewBox after the calculations are ready. </p>
  
  <p>When I don't put the calculation in a separate Thread then I can refresh or build my Image.</p>