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