title: C# WPF project, how to avoid InvalidOperationException?
body: <p>We have a WPF project. I got the following error:</p>
  
  <pre><code>InvalidOperationException was unhandled
  The calling thread cannot access this object because a different thread owns it.
  </code></pre>
  
  <p>I try to get value from a TextBox from a worker thread created by me.</p>
  
  <p>How to avoid this.  I was able to avoid this in another Form project by using <code>delegate</code> call back and <code>Invoked()</code> method but somehow it doesn't work in this WPF project. </p>
  
  <p>any simple sample code? thanks,</p>