Telerik Forums
UI for WPF Forum
0 answers
21 views

Hi,

 I’m trying to handle the drag and drop operation from a winforms control (RadGridView for now, can be RadTreeView or RadListView too) to the RadScheduleView WPF.

 I have overridden the ConvertDraggedData from ScheduleViewDragDropBehavior class.

 The event isn’t firing when I’m dragging a row from my winforms GridView over the schedule.

 Is there a way to convert dragged data from the grid in winforms that make the event fires in WPF?

 Or another way to achieve the expected behavior ?

 Thanks.

 Rémi

Fabrice
Top achievements
Rank 2
Iron
 asked on 22 Dec 2023
1 answer
22 views

I'm trying to apply command from ViewModel to events like DragDrop.DragOver

<telerik:RadListBox>
 <telerik:EventToCommandBehavior.EventBindings>
     <telerik:EventBinding EventName="DragDrop.DragOver" Command="{Binding CommandCmd}"/>
 </telerik:EventToCommandBehavior.EventBindings>
</telerik:RadListBox>
But such code will not work. How to do this?
Dinko
Telerik team
 answered on 16 Nov 2023
1 answer
42 views

Hello.

I want drag and drop from selected cells to another target cells.

Is it possible move GridView selected string data cells to another cells with drag and drop?

like attached image

Martin Ivanov
Telerik team
 answered on 26 Sep 2023
0 answers
20 views

Hi, i am creating the below UI,

as seen in the picture below, the thumb is data blind elapsed time, and its working as expected, but i am not able to drag the thumb.

Thanks.

 

n/a
Top achievements
Rank 1
 updated question on 24 Sep 2023
1 answer
47 views

Hi,

I'm looking for some advice on the best control to use for user input of a single element, though drag&drop , that also has data validation display.

I have used it on RadListBox, RadGridView and RadTreeView but in this case I do not have a collection to fill.

I would like for the control to bind to a single property of type Foo and use the DragDropManager / BeahviorManager / PayloadManager to control what can be dragged / dropped onto the control so that the bound variable is updated.

I would also like for the control to display any validation error through INotifyDataErrorInfo

I would appreciate any suggestions.

 

Thank you for your help.

 

 

 

Martin Ivanov
Telerik team
 answered on 14 Aug 2023
1 answer
37 views
Hi, 

I'm trying to use your DragDropManager to be able to reorder my lists as I wish. 

And I have to congratulate you because it's very easy to use when you just want to reorder a list.

Unfortunately, I would like to execute a method after each drag and drop action.

I tried to bind a command on the Drop event but the list order wasn't modified yet. 

So I found the telerik:DragDropManager.DragDropCompleted which seemed perfect but I didn't succeed to use it.

I tried to respect MVVM pattern with the telerik:EventToCommandBehavior, System.Windows.Interactivity.EventTrigger but it didn't work.

I also tried to use it in the code-behind (xaml.cs) but nothing works.


Can you help me to understand what's the problem ?

And can you also help me to find a way to resolve my problem within respect the MVVM pattern ?


Thanks in advance for your time and your answer.
Martin Ivanov
Telerik team
 answered on 28 Jul 2023
1 answer
32 views
Hi I'am begginer with telerik and I'am using Radshapes and I want to avoid overlap between them can you help me how to do it and thanks
Martin Ivanov
Telerik team
 answered on 03 Jul 2023
0 answers
60 views

Hi,

I was not able to find this answer on the forum. It looks like a simple thing to do but I was not able to understand it.

I have three RadTreeView with the following xaml options: (IsDragDropEnabled="True" AllowDrop="True" telerik:ScrollingSettingsBehavior.IsEnabled="False" IsDragTooltipEnabled="False") . All three Trees have 2 level of data of 2 different type of objects. 

The drop of an item might be allowed or not, depending on a combination on:

  • the origin tree of the Drag (tree 1, 2 or 3)
  • the type of object selected (level 1 or level 2)
  • the target tree (tree 1,2 or 3)
  • the drop position (inside, after, before)

As an example, the level 2 objects of tree 1 cannot be dropped on tree 3, while on tree 2 the can only be dropped inside the level 1, or before/after the level 2 (not inside level 2).

I implemented all the controls to allow this behaviour in the handler of "DragDropManager.AddDropHandler", in which when the drop is not allowed I simply have that the DropAction = DropAction.None and everything is working fine.

However what I would like to have is that when the drop is not supposed to be allowed, the drop preview should not be visible. by drop preview I mean the line in between items when the drop position is after/before or the highlight of the target item when the drop position is inside. Note that I still would like to keep the drag preview of the source item,  and that I disabled the dragtooltip as not of interest.

I considered using the handler "DragDropManager.AddDragInitializeHandler" to set the AllowDrop to false for all the correct items, however sometimes (like in the example above) I want to disable the drop only for certain drop positions, thus the item AllowDrop property cannot be set to false at the beginning of the drag. 

What I think I should do is to use the handler "DragDropManager.AddDragOverHandler", in which I check if the drop is feasible. If it is not, I somehow disable the drop preview, if it is allowed, i enable it once again. This is where I'm stuck.

Considering the variable var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;

If after checking that the drop is not allowed I set options.DropTargetItem.AllowDrop = false, the visual result is exactly what I need. However, from that moment on the handler "DragDropManager.AddDragOverHandler" does not fire anymore on that Item, so I cannot set it again to true.

If instead I set options.DropTargetItem.IsDropAllowed = false; nothing happens.

I tried to play with the dragvisual property, setting as an example the  dragVisual.IsDropPossible = false, but it doesn't change the result (I guess that this property is only for the dragtooltip that I disabled)

Note that, if possible, I also do not want to override the drop position from the not allowed to the allowed one, like suggested in the documentation (https://docs.telerik.com/devtools/wpf/controls/radtreeview/how-to/drag-and-drop/enabled-drop-inside-only). 

           

Could you please suggest me how to proceed? Please let me know if you need more information.

Thanks in advance for your help.

 

 

Antonino
Top achievements
Rank 1
Iron
 asked on 03 May 2023
0 answers
51 views

Hi

I use DragDropManager inside a RadGridView. When a user drags a row over another row I want to perform an action. I setup the DragOver event with:

DragDropManager.AddDragOverHandler(row, OnRowDragOver);

This works most of the time. However if a user moves the mouse in a fast movement over the row the event is not fired.

Is there some property (maybe updateTime or throtteTime) I can lower to ensure the event is always fired?

Daniel
Top achievements
Rank 1
 asked on 27 Apr 2023
1 answer
37 views

Hello,

 

We experienced very slow startup times for our WPF Telerik app recently (~50 seconds).

I have attached a project to replicate the problem. It only happens sometimes, but when it does, the simple demo app takes up to 30 seconds to boot up (not counting build time). This happens with and without the debugger.

In the screenshot "telerik_debug_logs.png", we can see that the app decides to load 30+ Telerik DLLs, almost none of which are necessary for this tiny app. Loading all these DLLs takes time, most notably the first one (Telerik.Window.Controls.dll) which seems to take 5.9 seconds on it's own.

Interestingly enough, when we comment out the drag drop animation storyboard, only 2 of Telerik DLLs are loaded. See screenshot "telerik_debug_logs_NO_ANIMATION.png".

 

Is this expected behavior ? Is there something I can to to mitigate the long startup times ?

 

Config:

  • .NET 7 (also tested in .NET 6)
  • Telerik UI for WPF (XAML) v2023.1.117
  • VS 2022 v17.5.2

 

 

Best regards,

Julien G

 

 

 

Vladimir Stoyanov
Telerik team
 answered on 23 Mar 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?