Floating document window redock options

6 posts, 1 answers
  1. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 05 Jan 2018 Link to this post

    Hi

    My application has three documentWindows (image 1) and window3 can float (other two windows cannot float and are pinned). None of the them can be hidden or closed or autohide. When user tries to re-dock the floating window3, the docking guides show all directions (Image 2), I want the user to be able to dock in center (fill) position or to the right of window2 only. User cannot dock to any side or center of window1.

     

    1.User should only be able to dock window3 side by side or as vertically tabbed group to window2. window3 cannot enter the container of window1 in any case.

    2. When the user clicks on close button of floating window3, it should re-dock itself as tabbed document in the layout configuration the user last had; meaning if user had window2 and window3 tabbed side by side (traditional tabbed view), it should redock back to center (fill) position and if window3 was to the right of window2 (as shown in Image1), then likewise.

    Thanks.

     

  2. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 05 Jan 2018 Link to this post

    I am using WindowsForms 2017 R3 version on windows 8.

  3. Answer
    Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 05 Jan 2018 Link to this post

    Hello Rohit,

    Thank you for writing.

    You can achieve the desired result by handling the PreviewDockPosition event of the drag-drop service. In the event handler, you would be able to specify the allowed dock states. Additionally, you will also need to handle the TransactionComtted event of the dock control and save the dock position of the window so that you can later restore when you try to close it. The following documentation article provides detailed information: https://docs.telerik.com/devtools/winforms/dock/architecture-and-features/using-the-dragdropservice.

    I am also attaching my test project as well as a short video demonstrating the result on my end.

    I hope this helps. Let me know if you need further assistance.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 08 Jan 2018 Link to this post

    Thanks. This is exactly what I needed.
  5. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 09 Feb 2018 Link to this post

    Hi

    When I float a docked documentWindow and then redock as tabbed document, the collapse button on the splitter previously associated with the document window is gone.

    How can I add the collapse button back (for both horizontal and vertical direction splitter).

  6. Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 09 Feb 2018 Link to this post

    Hello Rohit,

    Please bear in mind that the splitter buttons are inherited in the dock by the base RadSplitContainer control. RadDock, however, is not intended to be operated through this API so please consider not to use it. You can refer to the documentation for more details about the features provided by RadDockhttps://docs.telerik.com/devtools/winforms/dock/overview.

    Let me know if you have other questions.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top