title: WPF image visibility is not changing
body: <p>I have the following method in my WPF project (.net 4):</p>
  
  <pre><code>private void MyMethod(){
      imgMyImage.Visibility = Visibility.Visible;
      DoWork();
      imgMyImage.Visibility = Visibility.Collapsed;
  }
  </code></pre>
  
  <p>The image is in a DockPanel, and I want it to appear while the "DoWork()" method is being executed, but it does not change state until after the "MyMethod()" method exits.  Can someone explain how to make this work correctly?</p>
  
  <p>Thank you for any help.</p>