Select to view content in your preferred language

UndoLastEdit

724
3
Jump to solution
02-07-2013 12:29 AM
ArneDahlman
Regular Contributor
Hi,

Users of my Silverlight 2.4 application wants to be able to undo vertex clicks as they are drawing a new polygon.

For example.
The third vertex was placed in the wrong location. Press 'U', the point is removed and the user can continue drawing, click/place a new vertex...

Is this possible to achieive in 2.4 or later versions?

The UndoLastEdit from EditGeometry seems only to work when vertex editing is activated. This is not the case here.
0 Kudos
1 Solution

Accepted Solutions
ArneDahlman
Regular Contributor
It worked out well.
I replaced the standard Add-tool with my own funktionality.

In case someone is interested, this is the workflow:
* Drawing a geometry using ESRI.ArcGIS.Client.Draw (get symbol and geometrytype from FeatureLayer.LayerInfo)
* Create new Graphic (get attributes from FeatureLayer.LayerInfo.Fields)
* Add Graphic to the map.

The undo is triggered by a key-event.

View solution in original post

0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
Did you look at the UndoLastVertex method?
Seems to be what you are looking for.
0 Kudos
ArneDahlman
Regular Contributor
Thank you for your reply.

Now I have tried UndoLastVertex in the Draw class as you suggested.
I works fine.

To use this I guess that instead of using the add command in Editor class, I need to make my own add functionality using Draw class.
Correct? Or is there any way to get a current Draw object instance from the editor?
0 Kudos
ArneDahlman
Regular Contributor
It worked out well.
I replaced the standard Add-tool with my own funktionality.

In case someone is interested, this is the workflow:
* Drawing a geometry using ESRI.ArcGIS.Client.Draw (get symbol and geometrytype from FeatureLayer.LayerInfo)
* Create new Graphic (get attributes from FeatureLayer.LayerInfo.Fields)
* Add Graphic to the map.

The undo is triggered by a key-event.
0 Kudos