Problem

InvalidOperationException on Resizing Forms Control in WPF-Docking Window

Posted 3 months ago by Avatar Florian

Hi,

I have problem in connection with DocumentWindows and Forms controls. I am trying to host a third party forms control inside a DocumentWindow that is docked in a DockSite. The Forms control contains a splitter control and this splitter control is resized in the OnLoad() method. When using ActiPro for this, there is always an InvalidOperationException thrown by the WPF Dispatcher ("Dispatcher processing has been suspended, but messages are still being processed").

I tried setting the child of the WindowsFormsHost after the DocumentWindow was created. But nothing seems to have an effect. As soon as the forms control becomes visible (and the OnLoad method is called) the exception is thrown. The ActiPro version and the .NET version do not seem to have any influence. The exception is thrown no matter what the versions were.

When I tried to rebuild the same thing with pure WPF without ActiPro and without Docksite but with a new window instead, the Forms control did not make any problems.

Do you have any idea why this happening and how a solution might look like?

Tanks in advance.


Comments (1)

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA

Hi Florian,

That's odd, we haven't heard of anything like that in the past and we have a lot of customers using WinForms controls in the Docking/MDI product.  The only suggestion I was going to give was what you tried, where you set the control with a delay.

I'm not sure what we could change to help with this, but if you'd like us to take a look, please write our support address mentioning this thread and attach a new simple sample project that shows it happening.  Then we'll debug with that to see if anything stands out that we can change. Be sure to remove the bin/obj folders from the ZIP and rename the .zip file extension so it doesn't get spam blocked.  Thanks! 


Actipro Software Support
Information The latest build of this product (2018.1 build 0672) was released 27 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.