Thursday, 11 December 2008 23:22 by
Bill Henning (Actipro)
We’ve had a lot of requests lately for improved support when using any sort of interop control (generally WinForms-based) within our Docking & MDI for WPF product. In should be noted that interop content may also include things like DirectX content, etc.
The main problem is this, WPF renders any interop content on top of WPF content on the same root window. The issues are described lower down in this topic:
http://msdn.microsoft.com/en-us/library/ms742522.aspx
In addition to the content rendering issues in WPF, there are some focus handling issues when dealing with interop controls.
What are we doing about it?
We have begun moving forward with finding ways to work around the above issues. Today I’d like to talk about a new workaround included in build 482 that was just released.
One major issue with Docking & MDI was that auto-hide flyouts would appear below interop content that was located in the MDI area. I’m happy to say that we’ve come up with a new property on DockSite that helps with this particular issue.
|

An auto-hide flyout (Tool Window 1) that shows on top of two documents with WinForms-based content
|
By setting the new DockSite.UseHostedAutoHidePopups property to false, you can now achieve auto-hide flyouts that appear above interop content. In the screenshot above, you’ll notice a WPF tool window flys out on top of documents that contain a SyntaxEditor for WinForms control instance and a WinForms WebBrowser control instance.
We recommend that if you do not host WinForms content in your documents, you should still keep DockSite.UseHostedAutoHidePopups its default value of true.
This was very tricky to implement and is a major step forward for the product!
Moving forward
We still have some more areas to work on. It’s likely that the next area will be a workaround so that the dock guides (when dragging a window) will appear on top of interop content. Stay tuned!