ArcGIS Pro 2.6 API Reference Guide
Animation Class
Members  Example 

ArcGIS.Desktop.Mapping Namespace : Animation Class
Represents the collection of tracks, keyframes and transitions that define an animation for the map.
Syntax
public sealed class Animation 
Public NotInheritable Class Animation 
Remarks

Animation is the process of creating a collection of sequential images and playing them back quickly to create an illusion of movement. Each image, just like a picture you take with a camera, marks a significant instance in time, and is called a keyframe. In ArcGIS Pro, animations are authored by defining a set of keyframes that the system uses to create interpolated intermediate frames. Animations can interpolate the camera position, map time, map range, and layer visibility and transparency.

An instance of this class is returned from the Map.Animation property and can be used to manipulate the state of the animation by creating, editing and deleting keyframes.

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.Animation

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

Animation Members
ArcGIS.Desktop.Mapping Namespace