InvalidOperationException on Resizing Forms Control in WPF-Docking Window

Docking/MDI for WPF Forum

Posted 6 years ago by (Anonymous)
Version: 18.1.0670
Platform: .NET 4.6
Environment: Windows 10 (64-bit)
Avatar

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 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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

The latest build of this product (v24.1.2) was released 3 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.