ArcGIS Pro 2.7 API Reference Guide
SetCamera(Envelope) Method
Example 

ArcGIS.Desktop.Layouts Namespace > MapFrame Class > SetCamera Method : SetCamera(Envelope) Method
Envelope
Sets the map frame extent using an envelope. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetCamera( 
   Envelope extent
)
Public Overloads Sub SetCamera( _
   ByVal extent As Envelope _
) 

Parameters

extent
Envelope
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
SetCamera will have no effect a map frame's extent being driven by a map series.
Example
//Set the extent of a map frame to the envelope of a feature.

//Perform on the worker thread
await QueuedTask.Run(() =>
{
  //Reference MapFrame
  MapFrame mf_env = layout.FindElement("Map Frame") as MapFrame;

  //Get map and a layer of interest
  Map m = mf_env.Map;
  //Get the specific layer you want from the map and its extent
  FeatureLayer lyr = m.FindLayers("GreatLakes").First() as FeatureLayer;
  Envelope lyrEnv = lyr.QueryExtent();

  //Set the map frame extent to the feature layer's extent / envelope
  mf_env.SetCamera(lyrEnv);  //Note - you could have also used the lyr as an overload option
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MapFrame Class
MapFrame Members
Overload List