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

In This Topic
    Extent Property (MapView)
    In This Topic
    Gets the current extent of the view.
    Syntax
    Public ReadOnly Property Extent As Envelope
    public Envelope Extent {get;}
    Remarks
    Use this in combination with ZoomTo(Geometry,Nullable<TimeSpan>,Boolean) to get and set the view's extent.
    Example
    Expand Extent
    {
      //Note: Needs QueuedTask to run
      {
        //Expand the current extent by the given ratio.
        var extent = mapView.Extent;
        var newExtent = GeometryEngine.Instance.Expand(extent, dx, dy, true);
        mapView.ZoomTo(newExtent);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also