NtTimeChartControl.endObjectDragging Event

This event is being raised when the user finishes dragging one or more objects. You can catch and cancel this event in order to cancel the dragging operation. In this case the obect(s) flip back to their original position.
In your event handler you can use the NtObjectDraggingEventArgs's member draggedDataObjects to find out which objects took part on dragging.
 
This event is very useful to avoid unwanted drag operations: For example you want to allow dragging in general but still want to avoid dragging objects too far. This might be the case if you do not want users to drag objects from one day to another. Then you catch this event. In the event args you will find the NtDisplayObject that also contains a reference to the NtDataObject from which you can get the original time of the object. Aditionally the event args also contain a member timeDeltaTicks, that tells you how far (and in which direction) the dragging was done. All together you will be able to judge if you want to allow the dragging to complete or if you prefer to cancel the event. Cancelling will put the dragged objects back to their original position.

Overload List:

Event Name Event Arguments Description

endObjectDragging

NtObjectDraggingEventArgs

 
Event raised when users start dragging an object.

Event Arguments:

NtObjectDraggingEventArgs
The member draggedDataObjects contains a List<NtDataObject> of all the objects that are currently selected and thereby take part on the dragging. Note: When catching this event, all participating data objects still have their original time stamp from before dragging. Only after approving the drag procedure (by not cancelling this event) the NtTimeChartControl will adjust the time stamps of the objects according to the drag distance.
The drag distance is stored in the event's member timeDeltaTicks. It tells you how far to the right (positive value) or to the left (negative value) the object(s) have been dragged. One tick is 100 nanoseconds.

Remarks:

While dragging, the time stamp of the NtDataObject stays unchanged up until the dragging completes and the endObjectDragging event completed without being cancelled.

See also:

beginObjectDragging
continueObjectDragging
NtObjectDraggingEventArgs