We have a WPF control built into the WinForms control, which, in turn, appears as an ActiveX control. This ActiveX is finally used in a C ++ application developed by a third party.
At some point, the ActiveX management user interface becomes frozen, while the rest of the C ++ application is working fine. After some debugging, I noticed that the WPF control was blocked every time I called Application.Current.Dispatcher.Invoke. However, WinForms management handles Control.Invoke calls just fine. Whenever I pause the debugger, I see that the UI thread does some work in the C ++ application, but does not seem to be blocked or waiting for anything. It is as if the user interface thread suddenly and inexplicably refused to execute WPF delegates.
A WPF control sometimes enters this state when a C ++ application monopolizes the UI thread for a long period of time (several minutes). The first thing I would like to do is use a different thread for such a time-consuming task, but, as I said, I am not responsible for what the C ++ application does. In any case, this is no reason for my WPF control to behave this way. I have no idea how to solve this problem; Any help would be appreciated.
source share