Class SketchEditor
Sketch editor used for performing edits on a map.
Inheritance
Implements
Namespace: Esri.ArcGISRuntime.UI
Assembly: Esri.ArcGISRuntime.dll
Syntax
[Obsolete("Use GeometryEditor instead")]
public sealed class SketchEditor : INotifyPropertyChanged, IGeometryEditor
Remarks
A sketch editor can only be associated with one map instance.
Constructors
| Name | Description |
|---|---|
| SketchEditor() | Initializes a new instance of the SketchEditor class. |
Properties
| Name | Description |
|---|---|
| AddCommand | Gets the command that when invoked adds vertex to the end of a multipart geometry Polyline or Polygon where the command parameter contains the MapPoint (or vertex) to add. |
| CancelCommand | Gets the command that cancels the current draw or edit operation. |
| CompleteCommand | Gets the command that commits and completes the draw or geometry edit operation. |
| CreationMode | Gets the creation mode. |
| DeleteCommand | Gets the command that when invoked removes the selected vertex from a multipart geometry Polyline or Polygon. Note also that in order to remove vertex, the multipart geometry must contain its minimum number of vertices required to make it a valid geometry. For example, Polyline must at least have 2 vertices and Polygon must at least have 3 vertices. |
| EditConfiguration | Gets the EditConfiguration that defines capabilities used by the SketchEditor |
| Geometry | Gets the current geometry. |
| IsEnabled | Gets or sets a value indicating whether SketchEditor is enabled to respond to map interaction. |
| IsVisible | Gets or sets a value indicating whether SketchEditor graphics are visible. |
| Opacity | Gets or sets the opacity applied to SketchEditor graphics. Must be a value between 0 and 1. |
| RedoCommand | Gets the command that performs a redo of the last undone geometry edit action. |
| SelectedVertex | Gets information on the current selected vertex. |
| Style | Gets or sets the SketchStyle that defines the symbology used by the SketchEditor. |
| UndoCommand | Gets the command that undoes the last geometry edit action. |
Methods
| Name | Description |
|---|---|
| ClearGeometry() | Clears the current geometry. |
| ClearVertexSelection() | Clears selection on vertices. |
| InsertVertexAfterSelectedVertex(MapPoint) | Returns a value indicating whether a new vertex with the specified location has been inserted after selected vertex. |
| MoveSelectedVertex(MapPoint) | Returns a value indicating whether the selected vertex has been moved to the specified new location. |
| RemoveSelectedVertex() | Removes the currently-selected vertex. |
| ReplaceGeometry(Geometry) | Replaces current geometry with specified geometry. |
| SelectMidVertex(Int32, Int32) | Selects mid-vertex with specified indices. |
| SelectVertex(Int32, Int32) | Selects vertex with specified indices. |
| StartAsync(Geometry) | Starts to edit Geometry based on the SketchEditConfiguration that the geometry supports. |
| StartAsync(Geometry, SketchCreationMode) | Starts to edit Geometry based on specified SketchCreationMode with the SketchEditConfiguration that the geometry supports. |
| StartAsync(Geometry, SketchCreationMode, SketchEditConfiguration) | Starts to edit Geometry based on specified SketchCreationMode and SketchEditConfiguration. |
| StartAsync(SketchCreationMode, SketchEditConfiguration) | Starts to draw geometry based on specified SketchCreationMode and proceeds to edit geometry with the specified SketchEditConfiguration. |
| StartAsync(SketchCreationMode, Boolean) | Starts to draw geometry based on specified SketchCreationMode and proceeds to edit geometry with the SketchEditConfiguration that the geometry supports; unless, optional drawAndEdit parameter is false, then sketch is complete once geometry is drawn. |
| Stop() | Stops the current sketch, which means Geometry is cleared along with its undo stack. There is no further updates by interaction nor programmatic methods that can update geometry. |
Events
| Name | Description |
|---|---|
| GeometryChanged | Occurs when the geometry has been moved, resized, rotated, or updated. |
| PropertyChanged | Occurs when a non-dependency property value changes. |
| SelectedVertexChanged | Occurs when the selected vertex has changed. |
See Also
Applies to
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 100.3 - 200.8 |
| .NET | 100.13 - 200.8 |
| .NET Windows | 100.13 - 200.8 |
| .NET Android | 200.0 - 200.8 |
| .NET iOS | 200.0 - 200.8 |
| .NET Framework | 100.0 - 200.8 |
| Xamarin.Android | 100.0 - 100.15 |
| Xamarin.iOS | 100.0 - 100.15 |
| UWP | 100.0 - 200.8 |