title: The calling thread cannot access this object because a different thread owns it
body: <p>There seems to be a lot of these errors found on the forum, but I can't apply most of them on my situation..</p>
  
  <p><strong>My problem:</strong></p>
  
  <p>I have a page: PosterHome.xaml, with a uniform grid on it.
  In my code-behind, I have a drawthread: </p>
  
  <pre><code>drawThread = new Thread(new ThreadStart(drawPosters));
                  drawThread.SetApartmentState(ApartmentState.STA);
                  drawThread.Start();
  </code></pre>
  
  <p>This threadmethod (drawPosters) is occasionally woken up by another class, using a autoresetevent. I get the error in this method the moment i'm changing the uniform grid rows:</p>
  
  <pre><code>while (true)
  {
    waitEvent.WaitOne();
    //do some calculations
    // change uniform grid rows &amp; cols
    posterUniformGrid.Rows = calculatedRows; //**-&gt; error is first thrown here**
    posterUniformGird.Columns = calculatedCols;             
  }
  </code></pre>
  
  <p>How should I handle this? Thanks in advance.</p>
  
  <p>Greets Daan</p>