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); }
System.Object
ArcGIS.Desktop.Mapping.Track
ArcGIS.Desktop.Mapping.CameraTrack
ArcGIS.Desktop.Mapping.LayerTrack
ArcGIS.Desktop.Mapping.RangeTrack
ArcGIS.Desktop.Mapping.TimeTrack
Target Platforms: Windows 10, Windows 8.1