ArcGIS Pro 2.7 API Reference Guide
Keyframe Class
Members  Example 

ArcGIS.Desktop.Mapping Namespace : Keyframe Class
Represents the base class for all keyframe types.
Syntax
public abstract class Keyframe 
Public MustInherit Class Keyframe 
Remarks

A keyframe is a visual way-point along the animation path in a map or scene. When an animation is played, values such as the location of the camera, the current map time, the current map range, and layer transparencies are interpolated between the stored states defined by the keyframe using a configurable transition type. The transition type defines how frames are interpolated between keyframes.

For example, let's say we have 2 keyframes in a track one at a time of 0 seconds and the second at a time of 3 seconds. The first keyframe has a value for X of 1 and the second keyframe has a value for X of 5. The second keyframe defines the transition for X as linear. What this means is at 0 seconds in the animation X is 1, at 3 seconds X is 5 and at 1.5 seconds or halfway between the value would be 3. Each keyframe may have one or more values it stores and a corresponding transition definition for each value.

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);    
}
Inheritance Hierarchy

System.Object
   ArcGIS.Desktop.Mapping.Keyframe
      ArcGIS.Desktop.Mapping.CameraKeyframe
      ArcGIS.Desktop.Mapping.LayerKeyframe
      ArcGIS.Desktop.Mapping.RangeKeyframe
      ArcGIS.Desktop.Mapping.TimeKeyframe

Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Keyframe Members
ArcGIS.Desktop.Mapping Namespace