ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Framework.Contracts Namespace / Tool Class / Cursor Property
Example

In This Topic
    Cursor Property
    In This Topic
    Gets or sets the mouse pointer for this tool.
    Syntax
    public Cursor Cursor {get; set;}
    Public Property Cursor As Cursor
    Example
    Change the cursor of a Tool
    internal class CustomMapTool : MapTool
    {
      public CustomMapTool()
      {
        IsSketchTool = true;
        SketchType = SketchGeometryType.Rectangle;
        SketchOutputMode = SketchOutputMode.Map;
        //A custom cursor file as an embedded resource
        var cursorEmbeddedResource = new Cursor(new MemoryStream(Resource1.red_cursor));
        //A built in system cursor
        var systemCursor = System.Windows.Input.Cursors.ArrowCD;
        //Set the "CustomMapTool's" Cursor property to either one of the cursors defined above
        Cursor = cursorEmbeddedResource;
        //or
        Cursor = systemCursor;
      }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also