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

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

    Hello,

    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]
    Member
    Post count: 722

    Hi,

    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 :
    GetFloatingWindowsByZOrder()
    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;
    }
    else
    {
    var mainProcess = Process.GetCurrentProcess();
    if( mainProcess == null )
    yield break;

    windowParentHanlde = mainProcess.MainWindowHandle;
    }

    and see if it helps.

    Winston84
    Participant
    Post count: 2

    Hello,

    thank you very much. It worked like a charm.

    Diane [Xceed]
    Moderator
    Post count: 1353

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

    Download link:
    https://xceed.com/latest-xceed-toolkit-plus-for-wpf

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.