Interop Compatibility
There are several issues in general when embedding interop (e.g., NativeControlHost
) controls in docking window content. This topic discusses some of the ways Actipro Docking & MDI has been designed to improve compatibility with interop controls.
The primary issue is that interop content is always rendered on top of Avalonia content in the same root window (a.k.a. the airspace issue).
Quick Summary
If you don't wish to read the details below, the way to enable maximum compatibility with interop controls is to:
Set the DockSite.UseHostedPopups property to
false
.Set the DockSite.IsLiveSplittingEnabled property to
false
.
Read the following sections for more information on interop compatibility.
Using Non-Hosted Popups
Due to the airspace rendering issue mentioned above, if your application will host interop content, set the DockSite.UseHostedPopups property to false
. Setting that to false
will allow auto-hide popups and splitters to properly appear above interop content.
This will also allow interop content to appear properly in the auto-hide popups because it will disable auto-hide popup animation, which sometimes causes rendering glitches in interop controls.
If you do not plan on having interop content in your application, we recommend leaving the UseHostedPopups property as its default value of true
.
Live Splitting
By default, live splitting is enabled meaning that there is no preview highlight when dragging a splitter. The surrounding containers are immediately resized during splitter drags in this mode.
Sometimes this mode doesn't work well with interop controls since they could have glitchy rendering as they are resized. It's recommended to disable live splitting by setting the DockSite.IsLiveSplittingEnabled property to false
. In that mode, the splitters in the dock site will only resize the content when the drag operation has been completed. A preview of the split location is shown as the user drags to indicate the relative sizes of the content if the user releases the pointer. This allows complex UI to only be rendered once, after the drag operation is completed.