Can a floating pane NOT always be TopMost with regard to the main window?

8 posts, 0 answers
  1. Frank
    Frank avatar
    4 posts
    Member since:
    Aug 2011

    Posted 07 Nov 2011 Link to this post

    See subject line.

    I want to tear off a pane to be floating and then ble able that the main window (the starting window that is hosting the RadDocking Control) can be in front of the pane (toolwindow) that is now floating. Is this possible?

    I've seen that you can override the default implementation of IGeneratedItemsFactory which is consulted when the toolwindow is created. Would that help me?

    Regards,
    Frank
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 09 Nov 2011 Link to this post

    Hi Frank,

    What you need to do is to inherit from the ToolWindow class and override the GetWindowOwner virtual method and return null instead of what the base method returns. You can use use the GeneratedItemsFactory then to return instance of your custom ToolWindow. Please refer to the attached project.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Frank
    Frank avatar
    4 posts
    Member since:
    Aug 2011

    Posted 09 Nov 2011 Link to this post

    Hi Miroslav,
    thanks a lot for your help. That goes in the right direction. Setting the toolwindow owner to null removes the modality.

    However, there is a catch. When I start dragging the tool window it disappears behind the main window. If I minimize the main window, then the tool window remains visible but is strangely aware of the old window state: The dock symbols appear in mid-air and I can dock into the minimized window. :) This I could probably sell as feature, but the disappearing behind the main window is not very nice.

    I know it probably gets into funny terrain now, but if you have any idea what could change the behaviour (Z-Index?), please let me know.

    Regards
    Frank
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 10 Nov 2011 Link to this post

    Hi Frank,

    As this functionality is not built-in the Docking control it is not fully supported and some issues (like the ones you are experiencing) might occur. We will target the problem with the ZIndex in future, but I cannot give you concrete time frame for this. I cannot give you a work-around for the problem as well.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Mart71
    Mart71 avatar
    4 posts
    Member since:
    Jan 2014

    Posted 24 Mar 2015 Link to this post

    We are using the Telerik 2014.2.729.40 version and the behaviour described in the previous posts (Nov 2011) are still there. Any developments for this issue ?

    Thanks
  7. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 25 Mar 2015 Link to this post

    Hi Martin,

    We completely understand your concerns. However, with the current implementation of RadDocking when a Pane becomes floating (turns into ToolWindow) it is always on top of the MainWindow - this is how the control is expected to work. The only approach that we could suggest you in order to achieve a similar to the desired behavior of the ToolWindows is the one proposed by Miroslav.

    Hopes this helps.

    Regards,
    Nasko
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  8. Davide
    Davide avatar
    1 posts
    Member since:
    Aug 2015

    Posted 12 May in reply to Nasko Link to this post

    Hi ... 

    the issue I'm seeing with Miroslav implementation is that when I try to drag a floating window back into the main window the floating window goes behind. Is there a solution to this issue?

     

    Thx in advance

  9. Mart71
    Mart71 avatar
    4 posts
    Member since:
    Jan 2014

    Posted 12 May in reply to Davide Link to this post

    Hi Davide,

    The solution provided by Telerik to make the floating tab not "always on-top", is to set the owner of the WindowHost to null. But this solution has a major drawback: While draging the floating tab back in the main window, it disappears behind the main window.

    My solution consist to set the window TopMost on DragStart and set it back to non-TopMost on DragEnd. Just add the following methods in CustomToolWindow class (see the project provided by Telerik on 09 Nov 2011 above in this thread : Docking_ToolWindows_NotChildWindows.zip)  :

          protected override void OnDragStart(System.Windows.Point globalMousePosition, bool isResize)
             {
             base.OnDragStart(globalMousePosition, isResize);
             var windowHost = Window.GetWindow(this);
             if (windowHost != null)
                {
                windowHost.Topmost = true;
                }
             }

          protected override void OnDragEnd(Point globalMousePosition, bool isCancel, bool isResize)
             {
             base.OnDragEnd(globalMousePosition, isCancel, isResize);
             var windowHost = Window.GetWindow(this);
             if (windowHost != null)
                {
                windowHost.Topmost = false;
                }
             }

     

    Martin

Back to Top
UI for WPF is Visual Studio 2017 Ready