ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapTool Class
Properties Methods Events


In This Topic
    MapTool Class Members
    In This Topic

    The following tables list the members exposed by MapTool.

    Public Properties
     NameDescription
    Public Property Gets or sets the command label as it appears in the ribbon and customize dialog. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Public Property Gets or sets the mouse pointer for this tool. (Inherited from ArcGIS.Desktop.Framework.Contracts.Tool)
    Public PropertyGets or sets the supplementary text that appears with the Tooltip only when the command is disabled. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Public Property Gets or sets a boolean to specify whether the control is enabled. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Public Property Gets the DAML identifier. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Public PropertyGets or sets whether the ArcGIS.Desktop.Framework.Contracts.Button is checked. (Inherited from ArcGIS.Desktop.Framework.Contracts.Button)
    Public Property Gets or sets the large representation of the command, this may be an image or a xaml element. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Public Property Gets or sets the small representation of the command, this may be an image or a xaml element. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Public Property Gets or sets a brief description of the command that appears in a small pop-up window when a user pauses the mouse pointer over an element, such as over a Button. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Public Property Gets or sets a one or two word label that appears above the tooltip. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Top
    Protected Properties
     NameDescription
    Protected PropertyGets the active MapView.  
    Protected Property Gets or sets the mouse up behavior for Rectangle/Circle/Ellipse/Freehand sketches.  
    Protected Property Gets or sets the DAML ID of the context menu for the tool.  
    Protected Property Gets or sets the DAML ID of the toolbar to display for the tool.  
    Protected Property Gets or sets the DAML ID of the embeddable control to show in the dock pane when the tool is active.  
    Protected Property Gets the active editing template being used by the tool.  
    Protected Property Gets or sets the number of rows to be created with the current template. Use this when the MapTool is registered with the "esri_editing_construction_table" category indicating the tool is a table construction tool.  
    Protected PropertyGets the EmbeddableControl created for the tool. This is the control set by the ControlID property.  
    Protected Property Gets or sets whether the tool supports firing sketch events when the map sketch changes. Default value is false.  
    Protected PropertyGets or sets whether the geometry constructed from a finished sketch should be simplified prior to being returned to OnSketchCompleteAsync. The default value is true.  
    Protected Property Gets or sets whether the MapTool's default behavior of a left click should be to create a sketch.  
    Protected Property Gets or sets whether the sketch shows a symbol.  
    Protected Property Optional property to allow tool's embeddable control to remain open after the tool is deactivated.  
    Protected Property Gets or sets whether the embeddable control on the map view can be resized.  
    Protected Property Gets or sets the DAML ID of the embeddable control to show on the map view when the tool is active.  
    Protected Property Gets or sets the position of the embeddable control on the map view as a ratio.  
    Protected PropertyGets the EmbeddableControl created for the tool to be shown on the map view. This is control set by the OverlayControlID property.  
    Protected Property Gets or sets the DAML ID of the context menu shown when modifying a segment.  
    Protected Property Gets a read only ShortCut collection for the current tool. (Inherited from ArcGIS.Desktop.Framework.Contracts.Tool)
    Protected Property Gets or sets whether the ground to grid corrections heads-up display is shown when ground to grid is turned on in the UI. Default is false.  
    Protected Property Gets or sets whether the uncommitted sketch dialog is shown. Default is false.  
    Protected Property Gets and sets the SketchMode for the MapTool.  
    Protected PropertyGets or sets the number of sides for a regular polygon. Use when SketchType = SketchGeometryType.RegularPolygon or SketchType = SketchGeometryType.RegularPolyline.  
    Protected Property Gets or sets if the sketch geometry should be created using map or screen coordinates.  
    Protected Property Gets or sets the sketch symbology when the sketch is in selection mode.  
    Protected Property Gets or sets the symbol to use for the sketch. This is only supported when creating a sketch in map coordinates.  
    Protected PropertyGets and sets text for a sketch tip.The text follows the cursor when the tool is active.  
    Protected PropertyGets the Embeddable Control for the sketch tip for this tool. This is the control set by the SketchTipID property.  
    Protected Property Gets and sets the DAML ID of the embeddable control to show as a sketch tip.The control follows the cursor when the tool is active.  
    Protected Property Gets or sets the type or shape of the geometry to be created by the sketch.  
    Protected PropertyGets the SnapResult for each vertex in the current sketch.  
    Protected Property Gets or sets whether the sketch is for creating a feature and should use the CurrentTemplate.  
    Protected PropertyGets or sets if the sketch needs a selection in order to operate. This requirement allows the tool to have two different modes; the normal sketch mode and an additional selection mode.The user is able to toggle the tool between sketch and select modes by pressing and holding down the SHIFT key. When this occurs the sketch is suspended and the user can select additional features. Releasing the SHIFT key puts the tool back into sketch mode, restores the previous state of the sketch (and the sketch undo / redo stack) and allows you to resume sketching.

    The default value is false.  
    Protected Property Gets or sets whether to use snapping to precisely sketch on the active map view. The default value is false.  
    Top
    Protected Methods
     NameDescription
    Protected MethodToggles the tool between sketch and selection modes. Only supported when SketchType is set to Point, Line, Polygon, or Multipoint.  
    Protected MethodOverloaded.   
    Protected MethodOverloaded.   
    Protected Method Clears the current sketch in the active map view.  
    Protected Method Creates a new EditOperation to create a feature using the given template and geometry.  
    Protected Method Finishes the current sketch in the active map view.  
    Protected Method Gets the current geometry of the sketch without finishing it.  
    Protected Method Gets the default segment sketching symbol information. This method must be called on the MCT. Use QueuedTask.Run.  
    Protected Method Gets the symbol for a vertex while sketching. This method must be called on the MCT. Use QueuedTask.Run.  
    Protected MethodOccurs when the OnToolDoubleClick event is handled.  
    Protected MethodOccurs when the OnToolKeyDown event is handled.  
    Protected MethodOccurs when the OnToolKeyUp event is handled.  
    Protected MethodOccurs when the OnToolMouseDown event is handled.  
    Protected MethodOccurs when the OnToolMouseUp event is handled.  
    Protected Method Called to inform the Tool a Pane referencing it as the active tool is activating or deactivating.  
    Protected MethodOverloaded.  (Inherited from ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase)
    Protected Internal Method Called on the active tool when a pane change occurrs to see if the tool wants to remain active. (Inherited from ArcGIS.Desktop.Framework.Contracts.Tool)
    Protected Method Occurs when the current template is modified.  
    Protected Internal Method Occurs when a pointer is pressed on a Pane and the tool is active. (Inherited from ArcGIS.Desktop.Framework.Contracts.Tool)
    Protected Internal Method Occurs when a pointer is released over a Pane. (Inherited from ArcGIS.Desktop.Framework.Contracts.Tool)
    Protected Method Occurs when the selection changes in the map.  
    Protected Method Occurs when a sketch is canceled.  
    Protected Method Occurs when a sketch is finished.  
    Protected Method Occurs when a sketch is modified.  
    Protected Method Occurs when the tool is activated.  
    Protected Method Occurs when the tool is deactivated.  
    Protected Method Occurs when a mouse button is clicked on the view two or more times.  
    Protected Method Occurs when a key is pressed and the view has focus.  
    Protected Method Occurs when a key is released and the view has focus.  
    Protected Method Occurs when a mouse button is pressed on the view.  
    Protected Method Occurs when the mouse pointer moves over the view.  
    Protected Method Occurs when a mouse button is released on the view.  
    Protected Internal Method Occurs when a touch event occurs over a Pane. (Inherited from ArcGIS.Desktop.Framework.Contracts.Tool)
    Protected Internal Method Called periodically by the framework once the tool has been created. (Inherited from ArcGIS.Desktop.Framework.Contracts.PlugIn)
    Protected Method Sets the current sketch segment symbol back to the options defined in the application settings. This method must be called on the MCT. Use QueuedTask.Run.  
    Protected Method Sets the current sketch vertex symbols back to the options defined in the application settings. This method must be called on the MCT. Use QueuedTask.Run.  
    Protected Method Sets the current geometry of the sketch without finishing it.  
    Protected MethodOverloaded.  (Inherited from ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase)
    Protected Method Sets the segment sketching symbol information. This method must be called on the MCT. Use QueuedTask.Run.  
    Protected Method Sets the symbol for a vertex while sketching. This method must be called on the MCT. Use QueuedTask.Run.  
    Protected MethodOverloaded.   
    Protected MethodOverridden.  Occurs when a cursor is set on this tool. Forward the cursor to the inner tool.  
    Protected MethodOverloaded.   
    Top
    Public Events
     NameDescription
    Public Event Occurs when a property value changes. (Inherited from ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase)
    Top
    See Also