ArcGIS Pro 2.8 API Reference Guide
CreateKeyframe(Camera,TimeSpan,AnimationTransition) Method
Example 

ArcGIS.Desktop.Mapping Namespace > CameraTrack Class > CreateKeyframe Method : CreateKeyframe(Camera,TimeSpan,AnimationTransition) Method
The value of the camera.
The time at which to insert the keyframe in the track. In the UI the default is ArcGIS.Core.CIM.AnimationTransition.FixedArc.
The transition for keyframe.
Create a new keyframe.
Syntax
Public Overloads Function CreateKeyframe( _
   ByVal camera As Camera, _
   ByVal atTime As TimeSpan, _
   ByVal transition As AnimationTransition _
) As Keyframe

Parameters

camera
The value of the camera.
atTime
The time at which to insert the keyframe in the track. In the UI the default is ArcGIS.Core.CIM.AnimationTransition.FixedArc.
transition
The transition for keyframe.
Remarks
If a keyframe already exists at that time it will be overwritten. The time is rounded to the nearest millisecond. When you create a keyframe the specified transition will be used for all the values of the camera. It is possible to change the transitions for the individual values of the camera by settting the transition for the value on the keyframe./>
Example
Create a new camera keyframe from the active map view.
public void CreateCameraKeyframe(TimeSpan atTime)
{
  var mapView = MapView.Active;
  if (mapView != null)
    return;

  var animation = mapView.Map.Animation;
  var cameraTrack = animation.Tracks.OfType<CameraTrack>().First(); //There will always be only 1 CameraTrack in the animation.
  cameraTrack.CreateKeyframe(mapView.Camera, atTime, ArcGIS.Core.CIM.AnimationTransition.FixedArc);    
}
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

CameraTrack Class
CameraTrack Members
Overload List