ArcGIS Pro 2.7 API Reference Guide
Active Property (MapView)
Example 

ArcGIS.Desktop.Mapping Namespace > MapView Class : Active Property
Gets the active map view. Returns null if there is no active map view.
Syntax
public static MapView Active {get;}
Public Shared ReadOnly Property Active As MapView
Example
Rotate the active map view.
public void RotateView(double heading)
{
  //Get the active map view.
  var mapView = MapView.Active;
  if (mapView == null)
    return;

  //Get the camera for the view, adjust the heading and zoom to the new camera position.
  var camera = mapView.Camera;
  camera.Heading = heading;
  mapView.ZoomToAsync(camera, TimeSpan.Zero);
}
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MapView Class
MapView Members