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
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
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
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
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?
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
Hi Nasko,
thx for your help. I'll track the issue on the Feedback portal.