In the moment, I have a problem with multiple UI threads in WPF.
I have a third party component, which I need to use in a project. Unfortunately, every function of the component needs to be executed in the UI thread. The component itself has some long-term operations. For these operations, I want to show a Dialog that shows the progress of the operation. Additionally it should also be possible to cancel this operation. Since the long-term action of the component needs to be executed in the UI thread, the update of the progress bar is not very nice.
To avoid this problem I have put the dialog window in a separated UI thread. Now the progress is displayed as expected and very smoothly. However, now the dialog do not behave as a dialog. Since it is hosted in, a separate UI Thread It only blocks the User Interaction for this UI Thread and not for the main UI thread. Nevertheless, I want the dialog to block the main Window.
It would be possible to use Mousehoocks to achieve something like this. However, I want to know if it is possible to achieve this with WPF, C# functionality.
Therefore, I hope that anyone can help me with this problem.