ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapView Class / Extent Property

In This Topic
    Extent Property (MapView)
    In This Topic
    Gets the current extent of the view.
    public Envelope Extent {get;}
    Public ReadOnly Property Extent As Envelope
    Use this in combination with ZoomTo(Geometry,Nullable<TimeSpan>,Boolean) to get and set the view's extent.
    Expand Extent
    public Task<bool> ExpandExtentAsync(double dx, double dy)
      return QueuedTask.Run(() =>
        //Get the active map view.
        var mapView = MapView.Active;
        if (mapView == null)
          return false;
        //Expand the current extent by the given ratio.
        var extent = mapView.Extent;
        var newExtent = ArcGIS.Core.Geometry.GeometryEngine.Instance.Expand(extent, dx, dy, true);
        return mapView.ZoomTo(newExtent);

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also