ArcGIS Pro 2.8 API Reference Guide
OnAddToMap(Map,ILayerContainerEdit,Int32) Method

ArcGIS.Desktop.Mapping Namespace > IMappableItem Interface > OnAddToMap Method : OnAddToMap(Map,ILayerContainerEdit,Int32) Method
The map to which the item will be added.
A group layer to which the item will be added. If the group layer is null, then the item will be added directly to the map.
The position within the map or group layer. 0 represents the top most position.
Add the item to the map or groupLayer at the specified index.
Syntax
Overloads Sub OnAddToMap( _
   ByVal map As Map, _
   ByVal groupLayer As ILayerContainerEdit, _
   ByVal index As Integer _
) 

Parameters

map
The map to which the item will be added.
groupLayer
A group layer to which the item will be added. If the group layer is null, then the item will be added directly to the map.
index
The position within the map or group layer. 0 represents the top most position.
Remarks
This method is typically called when the item is dragged/dropped onto the TOC.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

IMappableItem Interface
IMappableItem Members
Overload List