This is a migrated thread and some comments may be shown as answers.

Floating document window redock options

5 Answers 193 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Rohit
Top achievements
Rank 1
Rohit asked on 05 Jan 2018, 08:54 AM

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.

 

5 Answers, 1 is accepted

Sort by
0
Rohit
Top achievements
Rank 1
answered on 05 Jan 2018, 09:03 AM

I am using WindowsForms 2017 R3 version on windows 8.

0
Accepted
Hristo
Telerik team
answered on 05 Jan 2018, 11:59 AM
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.
0
Rohit
Top achievements
Rank 1
answered on 08 Jan 2018, 07:28 AM
Thanks. This is exactly what I needed.
0
Rohit
Top achievements
Rank 1
answered on 09 Feb 2018, 12:40 PM

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).

0
Hristo
Telerik team
answered on 09 Feb 2018, 02:13 PM
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.
Tags
Dock
Asked by
Rohit
Top achievements
Rank 1
Answers by
Rohit
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or