ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / MapFrame Class / Map Property
Example

In This Topic
    Map Property (MapFrame)
    In This Topic
    Gets the Map associated with the MapFrame.
    Syntax
    Public ReadOnly Property Map As Map
    public Map Map {get;}

    Property Value

    Type: Map
    Example
    Zoom map frame to extent of a single layer
    {
      //Zoom map frame to the extent of a single layer.
    
      //Note: Must be on QueuedTask.Run
      //Reference map and layer
      Map m = mapFrame.Map;
      FeatureLayer lyr = m.FindLayers("GreatLakes").First() as FeatureLayer;
    
      //Set the map frame extent to all features in the layer
      mapFrame.SetCamera(lyr, false);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also