Edit Geometry Editing event

Discussion created by florian.gimat on Feb 1, 2012
Latest reply on Feb 2, 2012 by JNery-esristaff
I am currently trying to implement a feature using the EditGeometry that consists in snapping the currently edited vertex to any kind of Graphic element on a graphic layer.
The problem is that the only feedback I have while editing is through the GeometryEdit event that is only triggered once the vertex has moved.
However, what I want is to be able to snap the vertex while I am moving it.

I tried to work with the Map control MouseMove event, but the only way to get the changes from the geometry editing is by calling the EditGeometry.StopEdit() method.
I thought I could call this method, get the changes from the editing in order to see if a point has been moved, snap it if necessary and call the EditGeometry.StartEdit() again.
It led me to another problem that is if the StopEdit and StartEdit are called within the mouse move event callback (see following code example), the edited geometry get stucked and the only thing I have access to is to start or stop editing.

private void PART_Map_MouseMove(object sender, MouseEventArgs e)
     //Do some stuff here

I would really appreciate if someone could help me achieving my goal.
Also, would it possible for a feature version to get an event while the geometry is being edited?
Thank you for your help