title: Application.OpenForms[0].InvokeRequired equivalent in WPF
body: <p>I need equivalent for Application.OpenForms[0].InvokeRequired in WinForms for wpf.I tried with </p>
  
  <pre><code>var dispatcher = myDispatcherObject.Dispatcher;
  if (dispatcher.CheckAccess()) { /* ... */ }
  </code></pre>
  
  <p>but no luck</p>