Home Forums WPF controls Other WPF controls LayoutAnchorablePane won't dock when floating

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Winston84
    Post count: 2
    #44976 |


    First of all, nice Docking framework 🙂

    I’ve got a small wpf usercontrol which is hosted by a windows forms application. In this wpf usercontrol I’ve inserted a basic DockingManager with some LayoutAnchorables and LayoutAnchorablePanes in it. The Anchorables are arranged within a group. So far so good. But when dragging out the Anchorables from the docked state, they cannot be put together into a floating group. There is no exception or anything else. The drop zones aren’t displayed when trying to put two floating Anchorables together. The whole group itself can be dragged out from the manager without problem.

    Is this behaviour intended or is it impossible to implement with this combination (wpf in windows forms). Maybe there is a workaround for this problem?
    When I leave out the windows forms host, the docking works fine.

    Thank you for considering my request.

    Fawzi [Xceed]
    Post count: 722


    We were able to reproduce the issue and this should be fixed in V3.6.

    In the meantime, go in file Xceed.Wpf.AvalonDock/DockingManager.cs,
    In method :
    and replace the beginning :

    var parentWindow = Window.GetWindow( this );

    if( parentWindow == null )
    yield break;

    IntPtr windowParentHanlde = new WindowInteropHelper( parentWindow ).Handle;

    with :

    IntPtr windowParentHanlde;
    var parentWindow = Window.GetWindow( this );
    if( parentWindow != null )
    windowParentHanlde = new WindowInteropHelper( parentWindow ).Handle;
    var mainProcess = Process.GetCurrentProcess();
    if( mainProcess == null )
    yield break;

    windowParentHanlde = mainProcess.MainWindowHandle;

    and see if it helps.

    Post count: 2


    thank you very much. It worked like a charm.

    Diane [Xceed]
    Post count: 1353

    The fix was included in the latest release (v3.6)

    Download link:

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.