ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Desktop.Framework.Events Namespace / ActiveToolChangedEvent Class / Unsubscribe Method / Unsubscribe(Action<ToolEventArgs>) Method
The method being called.
Example

In This Topic
    Unsubscribe(Action<ToolEventArgs>) Method
    In This Topic
    Stop being notified when the event occurs.
    Syntax
    public static void Unsubscribe( 
       Action<ToolEventArgs> action
    )
    Public Overloads Shared Sub Unsubscribe( _
       ByVal action As Action(Of ToolEventArgs) _
    ) 

    Parameters

    action
    The method being called.
    Example
    Unsubscribe to Active Tool Changed Event
    private void UnSubscribeEvent()
    {
      ArcGIS.Desktop.Framework.Events.ActiveToolChangedEvent.Unsubscribe((args) =>
      {
        string prevTool = args.PreviousID;
        string newTool = args.CurrentID;
      });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also