ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMappableItem Interface / OnAddToMap Method / OnAddToMap(Map) Method
The map to which the item will be added.

OnAddToMap(Map) Method
Add the item to the map.
Syntax
List<string> OnAddToMap( 
   Map map
)

Parameters

map
The map to which the item will be added.

Return Value

The set of Uris for any data created.
Remarks
This method is typically called via the "Add Data" command, "Add Data from Path" command or if the item is dragged/dropped onto the map.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 2.4 or higher.
See Also