ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / LayoutView Class / ActivatedMapView Property
Example

In This Topic
    ActivatedMapView Property
    In This Topic
    Gets the activated map view or null if there is no ActivatedMapFrame
    Syntax
    Public ReadOnly Property ActivatedMapView As MapView
    public MapView ActivatedMapView {get;}

    Property Value

    ArcGIS.Desktop.Mapping.MapView
    Example
    Get the Activated Map Frame and MapView
    {
      //The active view must be a layout view.
      var lv = LayoutView.Active;
      if (lv == null)
        return;
    
      var map_view = lv.ActivatedMapView;
      if (map_view != null)
      {
        //TODO - use activated map view
      }
      var map_frame = lv.ActivatedMapFrame;
      if (map_frame != null)
      {
        //TODO - use activated map frame
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.1 or higher.
    See Also