public void CreateTimeKeyframe(TimeSpan atTime) { var mapView = MapView.Active; if (mapView != null) return; var animation = mapView.Map.Animation; var timeTrack = animation.Tracks.OfType<TimeTrack>().First(); //There will always be only 1 TimeTrack in the animation. timeTrack.CreateKeyframe(mapView.Time, atTime, ArcGIS.Core.CIM.AnimationTransition.Linear); }
System.Object
ArcGIS.Desktop.Mapping.Track
ArcGIS.Desktop.Mapping.TimeTrack
Target Platforms: Windows 11, Windows 10