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

Better event for item moved events

3 Answers 95 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Dario Concilio
Top achievements
Rank 2
Dario Concilio asked on 12 May 2017, 08:54 AM

Hi to all,

I don't understand witch event is better to intercept when a Shape was moved.

I need to trace when Shape change position.

3 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 12 May 2017, 02:25 PM

HI Dario,

It depends on what you are trying to do. If you need to know if the shape changed because the shape needs to update something within itself then use the OnPostiionChanged event of the RadDiagramShapeBase. 

If you need your logic to roll up to the diagram level, use the ItemChanging or ItemChanged event of RadDiagram. This gives you the ability to capture all changes on the diagram. 

Shawn

0
Accepted
Petar Mladenov
Telerik team
answered on 15 May 2017, 06:52 AM
Hi Dario,

In addition, you can consider the RadDiagram's Drag event. It will fire when you move the shapes with mouse. The given DragRoutedEventArgs will provide start mouse point, end mouse point and the list of dragged items.


Regards,
Petar Mladenov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Dario Concilio
Top achievements
Rank 2
answered on 15 May 2017, 07:33 AM

Yes, I saw it.

Thank you Petar.

Tags
Diagram
Asked by
Dario Concilio
Top achievements
Rank 2
Answers by
Shawn
Top achievements
Rank 1
Petar Mladenov
Telerik team
Dario Concilio
Top achievements
Rank 2
Share this question
or