Show / Hide Table of Contents

Class ShapeTool

Allows you to create polygon or polyline geometries with a geometric shape by using a single drag interaction.

Inheritance
System.Object
GeometryEditorTool
ShapeTool
Implements
System.ComponentModel.INotifyPropertyChanged
GeometryEditorTool.Style
GeometryEditorTool.PropertyChanged
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 Style. By default, this tool enables creation, selection, transformation, and deletion. This behavior can be customized with Configuration.

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

VertexTool
FreehandTool
ReticleVertexTool
Tool

Applies to

TargetVersions
.NET Standard 2.0200.3 - 200.7
.NET200.3 - 200.7
.NET Windows200.3 - 200.7
.NET Android200.3 - 200.7
.NET iOS200.3 - 200.7
.NET Framework200.3 - 200.7
UWP200.3 - 200.7
In This Article
Back to top Copyright © 2022 Esri.