title: Embed threaded WindowsFormsHost in WPF
body: <p>I have a WPF application and an ActiveX control that gets embedded into the WPF application using a <code>WindowsFormsHost</code> control.<br>
  The <code>ActiveX</code> control is used to communicate with an external application that draws 3D contents into the control.  </p>
  
  <p>One big issue of this setup is that if the ActiveX control does some long running operations, the rest of the WPF application gets blocked.<br>
  I would like to solve this issue and somehow prevent the <code>ActiveX</code> control to be hosted on the same thread as the remaining controls in my UI.  </p>
  
  <p>I searched for possible solutions and found this article:<br>
  <a href="https://blogs.msdn.microsoft.com/dwayneneed/2007/04/26/multithreaded-ui-hostvisual/" rel="nofollow noreferrer">https://blogs.msdn.microsoft.com/dwayneneed/2007/04/26/multithreaded-ui-hostvisual/</a></p>
  
  <p>Unfortunately I cannot use this sample to host a <code>WindowsFormsHost</code> element as it is not derived from <code>Visual</code>.
  The only other option I could implement so far is to host the <code>ActiveX</code> control inside a separate window which I launch on a separate thread.<br>
  Although this works it is quite messy to manage as I have to manually snap the separate window to the main window to get kind of a uniform layout.  </p>
  
  <p>Is there anything else I can try to achieve a single-window experience but also having the <code>ActiveX</code> control hosted on a separate thread?</p>