title: WPF in WinForms: blocked on Dispatcher.Invoke although UI thread alive
body: <p>We have a WPF control embedded in a WinForms control which is in turn exposed as an ActiveX control. This ActiveX is finally used in a C++ application developped by a third party.</p>
  
  <p>At some point, the ActiveX control's UI becomes frozen, whereas the rest of the C++ application runs fine. After some debugging, I noticed that the WPF control was blocked on every call of Application.Current.Dispatcher.Invoke. However, the WinForms control processes its calls of Control.Invoke just fine. Whenever I pause the debugger, I can see that the UI thread is doing some work in the C++ application, but doesn't seem to be blocked or waiting for anything. It's as if the UI thread was suddenly and inexplicably refusing to execute the WPF delegates.</p>
  
  <p>The WPF control sometimes enters this state when the C++ application monopolizes the UI thread for an extended period of time (a few minutes). The first thing I would do would be to use a different thread for such a time-consuming task, but as I already said, I'm not responsible for what the C++ application is doing. Anyway, this is no reason for my WPF control to behave in such a way. I have no idea how to solve this problem though; any help would be appreciated.</p>