RadDock/TabItem stop tab item selection when dragging

1 Answer 43 Views
Docking DragAndDrop
Top achievements
Rank 1
Steve asked on 01 Sep 2022, 10:39 AM


Is it possible to stop tab item from being selected when dragging? We have a quite complex UI which takes long time to render (this is an ongoing issues and we are working on it) and when user tries to drag a tab item within RadDocking it takes a long time. We already use Deffered mode for dragging, but if an item is not selected/rendered it will take a while to render and then drag. I hope this makes sense.

Here is how we have our Docking set up:

<telerik:RadDocking DragDropMode="Deferred" AllowDragReorder="True">
			<telerik:RadPaneGroup telerik:RadDocking.SerializationTag="DocHost">

RadPanes are added from code as they are deserialised per user. I will skip that code for this question but can add it if needs be. 

We also have a style that is assigned to the dragged visual, like so:

<Style TargetType="telerik:DraggedElementVisualCue">
	<Setter Property="Template">
			<ControlTemplate TargetType="telerik:DraggedElementVisualCue">
					<Rectangle Fill="WhiteSmoke"/>
					<TextBlock Text="{Binding Title}"/>

I am not sure if this has any effect on this but wanted to include it just in case.



1 Answer, 1 is accepted

Sort by
Dilyan Traykov
Telerik team
answered on 06 Sep 2022, 08:58 AM

Hi Steve,

Thank you for the provided code snippets.

I'm afraid I cannot think of a straightforward way to prevent the selection of the item whilst still keeping the drag functionality intact. I tried overriding the OnHeaderMouseLeftButtonDown method of the RadPane with the idea to execute its logic in the OnHeaderMouseLeftButtonUp override. This, however, leads to the MouseMove event of the pane not being called which in turn does not execute the dragging logic.

With this said, I would instead recommend loading the content of the pane only if its IsDragging property is false. If this load occurs too early for the property to be set, you can delay this by a few milliseconds.

Please give this a try and let me know if such an approach would work for you.

Dilyan Traykov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Top achievements
Rank 1
commented on 06 Sep 2022, 03:01 PM

Hi Dilyan,

Thanks for your reply. Seems like a reasonable solution. I will give this a try and come back with my findings.


Regards Steve

Dilyan Traykov
Telerik team
commented on 06 Sep 2022, 04:30 PM

Hi Steve,

Do let me know how this goes. I will be awaiting your reply.
Top achievements
Rank 1
commented on 20 Sep 2022, 09:24 AM

Hi Dilyan,

We ended up leaving this functionality as is. The IsDragging property is defo worth investigating further. For now we have other priorities to work with.

Thanks again

Docking DragAndDrop
Asked by
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question