Class ShapeTool
Allows you to create polygon or polyline geometries with a geometric shape by using a single drag interaction.
Implements
Namespace: Esri.ArcGISRuntime.UI.Editing
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class ShapeTool : GeometryEditorTool, INotifyPropertyChanged
Remarks
Create a new shape tool using Create(ShapeToolType) and specify the type of shape to be created (the ShapeType cannot be changed after the tool is instantiated). Call Start(GeometryType), passing in either Polyline or Polygon, then drag on the MapView to define the location and size of the shape. For example, drag diagonally to define the corners of a bounding box within which a Rectangle or Arrow shape fits, or to define the center point and a point on the circumference of an Ellipse or point of a Triangle.
You can select different GeometryEditorElement objects by tapping, move selected elements, and use transformation control handles to rotate and scale the selected elements, subject to the current Configuration.
You can also use this tool to add new geometric shaped parts to existing polygon or polyline geometries by
setting AllowPartCreation to true
in the Configuration and calling
Start(Geometry). You cannot use ShapeTool to create geometry types other than
Polygon or Polyline.
By default, this tool does not display vertices or mid-vertices because you do not interact with individual
vertices using this tool. The appearance can be customized by changing
Properties
Name | Description |
---|---|
Configuration | Gets or sets the defines the set of interactive operations enabled when using this tool. |
ShapeType | Gets the type of geometric shape drawn by this tool, set at instantiation using Create(ShapeToolType). |
Methods
Name | Description |
---|---|
Create(ShapeToolType) | Create a ShapeTool to draw the specified ShapeToolType. |
See Also
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 200.3 - 200.5 |
.NET | 200.3 - 200.5 |
.NET Windows | 200.3 - 200.5 |
.NET Android | 200.3 - 200.5 |
.NET iOS | 200.3 - 200.5 |
.NET Framework | 200.3 - 200.5 |
UWP | 200.3 - 200.5 |