Behavior of DockSite.UseHostedPopups=false

Docking/MDI for WPF Forum

Posted 6 months ago by Yuki
Version: 23.1.3
Avatar

Hello,

We are using DockSite.UseHostedPopups=false because some document windows contain WebView2.

Is is expected behavior that popup tool window is displayed above on other floating window?

When DockSite.UseHostedPopups is true, the tool window is displayed behind of floating window.

Comments (3)

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

Hello,

When UseHostedPopups is false, a displayed auto-hidden tool window will use a WPF Window behind the scenes to host it.  This allows the tool window content to appear above interop controls such as WebView2 that might be in the main WPF Window, working around the well-known "airspace" issue in WPF.

The screenshot you sent privately for this scenario shows a floating document window (also in a separate hosting WPF Window) in between the main WPF Window that hosts the DockSite, and the auto-hide popup WPF Window.  I was unable to reproduce that in our sample, at least by only toggling UserHostedPopup to false.  If the "About.txt" document window is floating above the main WPF Window, when you click the "Find & Replace" auto-hide tab, that brings the main WPF Window above the "About.txt" document window, which doesn't seem to be the case in the screenshot you sent.  Perhaps you have other code or options set that is causing that scenario?


Actipro Software Support

Posted 6 months ago by Yuki
Avatar

Hello,

Sorry, would you please confirm with DockSite.FloatingWindowShowInTaskBarMode="Never"?

Answer - Posted 6 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

In that scenario with UseHostedPopups="False" and FloatingWindowShowInTaskBarMode="Never", this situation could occur due to how WPF Windows work. 

FloatingWindowShowInTaskBarMode="Never" will cause the WPF Window that hosts the floating document to be "owned" by the main WPF Window that hosts the DockSite.  When a WPF Window is owned by another, it always appears on top of the owner.  Normally only tool windows are set up to be that way.  If we didn't make sure the floating document WPF Window was owned by the main WPF Window, and the floating document WPF Window didn't appear in the taskbar, it would be able to fall behind all other windows in z-order and wouldn't be able to be accessed any more.

As you then show the non-hosted auto-hide popup (which is also a WPF Window) on top, the owned floating document WPF Window gets stuck in z-order between the main WPF Window and the auto hide popup WPF Window.  There's unfortunately nothing we can really do about that.  

It's probably not a good idea to those two options at the same time, since it's not a particularly good outcome in this scenario.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.