ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Track Class / Keyframes Property
Example

In This Topic
    Keyframes Property (Track)
    In This Topic
    Gets the collection of keyframes for the track.
    Syntax
    public IReadOnlyList<Keyframe> Keyframes {get;}
    Public ReadOnly Property Keyframes As IReadOnlyList(Of Keyframe)
    Example
    Camera Keyframes
    public List<CameraKeyframe> GetCameraKeyframes()
    {
      var mapView = MapView.Active;
      if (mapView != null)
        return null;
    
      var animation = mapView.Map.Animation;
      var cameraTrack = animation.Tracks.OfType<CameraTrack>().First(); //There will always be only 1 CameraTrack in the animation.
      return cameraTrack.Keyframes.OfType<CameraKeyframe>().ToList();
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also