Hi Blanca,
Thanks for contacting Syncfusion support.
We have created a simple sample to achieve your requirement. We suggest you to use Diagram.Model.EventSink’s “PinpointChanging/PinpointChanged” events and Node’s “BoundingRectangle” property to get the node’s coordinates value while performing the drag/drop operation using mouse/keyboard. Please refer to the below sample and code example.
Code example:
[C#]
diagram1.Model.EventSink.PinPointChanged += new PinPointChangedEventHandler(EventSink_PinPointChanged);
diagram1.Model.EventSink.PinPointChanging += new PinPointChangingEventHandler(EventSink_PinPointChanging);
void EventSink_PinPointChanging(PinPointChangingEventArgs evtArgs)
{
Node node = evtArgs.NodeAffected as Node;
float x = node.BoundingRectangle.X;
float y = node.BoundingRectangle.Y;
}
void EventSink_PinPointChanged(PinPointChangedEventArgs evtArgs)
{
Node node = evtArgs.NodeAffected as Node;
float x = node.BoundingRectangle.X;
float y = node.BoundingRectangle.Y;
MessageBox.Show("X Value : " + x.ToString() + "\n" + "Y Value : " + y.ToString(), "Nodes Coordinates", MessageBoxButtons.OK);
}
Sample:
Regards,
Naganathan K G