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

Draging RadPaneGroup

10 Answers 252 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Leśmian
Top achievements
Rank 2
Leśmian asked on 09 Nov 2015, 06:41 AM

Hi,

in the RadDocking control I have defined DocumentHost with RadPaneGroup. Inside that group I have many tabs (RadPanes). So now I want to move whole RadPaneGroup not separate RadPanes. I know it is possible with basic RadPaneGroup (not inside DocumentHost), but then headers of the tabs are on bottom and I want to display them on top? 

10 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 11 Nov 2015, 04:26 PM
Hi Lukas,

The desired by you functionality of RadDocking is not supported out of the box. RadDocking is an advanced window management system that helps you to manage multiple panes like the one in Microsoft Visual Studio. Because of that we tried the behavior of RadDocking to be as much as closer to Visual Studio - in Visual Studio the desired by you functionality is either not supported. 

What we could suggest you in as an approach that might help you to achieve the desired is to make one Pane from the DocumentHost floating using the MakeFloatingDockable method. After that you need to iterate through all the other panes placed inside the DocumentHost and add them to the PaneGroup of the floating pane.

We hope the provided information will help you.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Leśmian
Top achievements
Rank 2
answered on 17 Nov 2015, 11:29 AM
Thx for your help Nasko. I have another question. How can I disable dragging a pane while in the DragDropMode="Deferred"? I mean when I set CanFloat="False" pane still can be dragged and I want to disable that functionality for some panes. Additionally I want to disable some RadSplitContainers to allow drop inside them - to do that I need to implement custom  PreviewShowCompass event?
0
Leśmian
Top achievements
Rank 2
answered on 17 Nov 2015, 11:33 AM
Thx for your help Nasko. I have another question. How can I disable dragging the pane while the RadDocking control is in DragDropMode="Deferred"? I mean when I set CanFloat="False" there is still a possibility to drag pane to another place, but I want to disable that feature for some panes. Additionally, I want to disable drop zones for some RadSplitContainers - so other panes cannot be dropped inside them. Should I implement custom PreviewShowCompass event to do that?
0
Nasko
Telerik team
answered on 18 Nov 2015, 12:14 PM
Hello Lukas,

I am afraid that in Deferred DragDropMode you cannot disable drag-drop for a specific pane as all the drag-drop operations are implemented internally. 

However, as a workaround what we could suggest you is to cancel the DragInitialize method for the specific pane you need to prevent dragging using the DragDropManger:
public MainWindow()
{
    InitializeComponent();
 
    DragDropManager.AddDragInitializeHandler(this.radDocking1, this.OnDragInitialize, true);
    DragDropManager.AddDragInitializeHandler(this, this.OnDragInitialize);
}
 
private void OnDragInitialize(object sender, DragInitializeEventArgs e)
{
    if (sender is MainWindow)
    {
        // Raise drag event from radpane, started from overlay
        this.NonDraggablePane.RaiseEvent(e);
    }
    else
    {
        if(sender is RadDocking)
        {
            var selectedPane = (sender as RadDocking).ActivePane as RadPane;
 
            if(!selectedPane.CanFloat)
            {
                e.Handled = true;
                e.Cancel = true;
            }
        }
    }
}

We have also created a sample project that demonstrates that approach - please, check it.

As for the desired functionality to disable the user's ability to dock panes to some side you could use the PreviewShowCompass event. Please, check the following article for some more detailed information:
http://docs.telerik.com/devtools/wpf/controls/raddocking/how-to/implement-conditional-docking.html

Hope this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Leśmian
Top achievements
Rank 2
answered on 19 Nov 2015, 12:51 PM
Thx for your help Nasko, that's exactly what is was looking for! I don't quite get this part: "this.NonDraggablePane.RaiseEvent(e);"? When the sender of DragInitialize event will be Window? I couldn't find any example. If I have many NonDraggablePanes should I RaiseEvent for all of them?
0
Leśmian
Top achievements
Rank 2
answered on 19 Nov 2015, 01:53 PM
Additionally I think I have found a bug in Deffered mode. When panel is docked to one side, eg right side of a Window and it's longer than half of the Window width then it's not possible to dock in on top of the Window, even though compass and preview of docking is showing correctly. When I drop it on top its still docking to the right side of Window, probably because the top compas rectangle is hovering on top of the RadPanel that I'm dragging. In normal mode Panel is docked on top normally.
0
Nasko
Telerik team
answered on 23 Nov 2015, 03:30 PM
Hi Lucas,

I will go straight to your questions. 

1. The NonDraggablePane.RaiseEvent(e) code is needed to handle scenarios where the user clicks and holds the header of RadPane, he can still drag the pane. Because of that the event should also be raised when the sender is Window. This behavior occurs in rare occasions.

2. You need to improve the logic implemented inside the OnDragInitialize method as needed, in order to call the RaiseEvent only for those Panes you need.

3. Could you please, capture us a video with the observed by you issue because we are not exactly sure that we completely understand your scenario and we were not able to reproduce it on our side?

We are looking forward to hearing from you.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Leśmian
Top achievements
Rank 2
answered on 23 Nov 2015, 07:48 PM

Thx Nasko,

I couldn't attach a video and sample project to my replay so I uploaded them to my Google drive:

video: https://drive.google.com/file/d/0ByvCjk9UKcTxbVZoZ2NmNHBlQmc/view?usp=sharing

sample project: https://drive.google.com/file/d/0ByvCjk9UKcTxczlTamZ0ME9VWFk/view?usp=sharing

 On the video first I try to drag DockedRight panel to top indicator and it moves fine. Then I increase panel width and attempt to make the same action, but it fails if compass indicator is hovering on top of the panel. However preview of docking is showing correctly. Is it a bug or maybe I'm doing something wrong?

0
Nasko
Telerik team
answered on 26 Nov 2015, 10:54 AM
Hello Lukas,

Thank you for the attached video and project.

We were able to reproduce the observed by you issue - it is caused by implemented internal logic of the drag and drop functionality of the Panes and Groups. Also, we have logged the issue in our Feedback portal and you could vote for the item and track its status on the following link:
http://feedback.telerik.com/Project/143/Feedback/Details/176354-pane-could-not-be-dropped-when-the-compass-is-on-top-of-its-panegroup-in-differed

Unfortunately, currently we could not suggest you any proper workaround. We apologize for the caused inconvenience and updated your Telerik points for the involvement.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Leśmian
Top achievements
Rank 2
answered on 30 Nov 2015, 06:21 AM

Hi Nasko,

thx for your help. I'll track the issue on the Feedback portal.

Tags
Docking
Asked by
Leśmian
Top achievements
Rank 2
Answers by
Nasko
Telerik team
Leśmian
Top achievements
Rank 2
Share this question
or