ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapTool Class
Members

In This Topic
    MapTool Class
    In This Topic
    Represents a tool command used to perform interactive operations on a MapView.
    Object Model
    MapTool ClassMapView ClassEditingTemplate ClassEmbeddableControl ClassSegmentSymbolOptions ClassVertexSymbolOptions ClassEmbeddableControl ClassCIMSymbolReference ClassCIMSymbolReference ClassEmbeddableControl Class
    Syntax
    Remarks

    This base class can be used to create tools to interactively identify and select features in the view or to create custom construction and editing tools. It provides virtual methods that can be overridden to perform actions when keyboard and mouse events occur in the map view, such as OnToolMouseDown and OnToolKeyDown. When overriding mouse and keyboard virtual methods if you need to execute any asynchronous code first set the handled property on the event arguments to true, override the corresponding "Handle...Async" method, and add your asynchronous code.

    By setting the IsSketchTool property to true, the tool will create a sketch in the map view with a left mouse click. Use the SketchType property to set the geometry type of the sketch and use the SketchOutputMode property to specify whether the sketch geometry is in screen or map coordinates. Override OnSketchCompleteAsync to add behavior to the tool when the sketch is finished.

    Inheritance Hierarchy
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also