HWND inside HwndHost inside DockSite, incorrect display when dragging out window

Docking/MDI for WPF Forum

Posted 12 years ago by Peter Schregle
Version: 11.2.0552
Avatar

I have a HwndHost derived class inside a scroll viewer inside a DockSite (via a DataTemplate).

I have set DockSite.UseHostedAutoHidePopups to "False" and DockSite.IsLiveSplittingEnabled to "True" as suggested in the Docking & MDI Interoperability / WinForms Compatibility section of the documentation.

Most things work nicely, but as soon as I drag out the document window, it no longer displays my HWND content but some string "nVision.ViewModel.ImageDocumentViewModel".

When I drag the window back in, display is correct again.

If I set DockSite.UseHostedRaftingWindows = "True", the HWND content is displayed properly, but I cannot drag the window outside the bounds of my application. Is there anything I can do to do allow dragging document windows to the outside while still ensuring that the display is correct?

Comments (2)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Peter,

Chances are that your DataTemplate is defined in the Resources of your main Window. Since rafting windows are separate instances of Window, the DataTemplate will not be found. You would need to move the DataTemplate to the Application.Resources in order for it to be picked up by all Windows in your application.


Actipro Software Support

Posted 12 years ago by Peter Schregle
Avatar

Thanks a lot. That helped.

Peter

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.