title: Need to mirror/duplicate a window in a another window under WPF
body: <p>I have an application where I've just recently discovered will also have to run in a mirrored window at a completely different resolution.</p>
  
  <p><a href="http://eprystupa.wordpress.com/2008/07/28/running-wpf-application-with-multiple-ui-threads/" rel="nofollow">This link describes how multiple windows can each have different UI threads</a></p>
  
  <p>I think my windows will need to run on different UI threads for performance reasons. So, now I need to mirror the viewable area of one window on another window. I have tried to set the DataContext of the second window to the first window but that causes an exception since they are different threads (a modified version of the above link).</p>
  
  <pre><code>        Thread thread = new Thread(() =&gt;
          {
              MainWindow w = new MainWindow();
              w.DataContext = MainWindow.DataContextProperty;
              w.Show();
  
              w.Closed += (sender2, e2) =&gt;
               w.Dispatcher.InvokeShutdown();
  
              System.Windows.Threading.Dispatcher.Run();
          });
  
          thread.SetApartmentState(ApartmentState.STA);
          thread.Start();
  </code></pre>
  
  <p>Any ideas?</p>