title: how to get access to the window in the wpf multi thread app
body: <p>I have a separate thread that listens for data. And on receiving some data it needs to access one of the windows in the app and set some fields for that window.</p>
  
  <p>Right now when I use this it throws an exception(saying this threads cannot access as Windows1 is owned by other thread):</p>
  
  <pre><code>        foreach (Window w in App.Current.Windows)
          {
              if (w.Name == "WindowIamInterested")
              {
                  //w.SetField set some fields in the window and 
                  //and do w.Show() or w.Activate() to show the window to user
              }
          }
  </code></pre>
  
  <p>The above code runs in a separate thread and not the main thread.
  Is there a way I can access and modify the window.</p>