ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LayerTrack Class
Members Example

In This Topic
    LayerTrack Class
    In This Topic
    A track containing a collection of LayerKeyframe objects that defines the visibility and transparency of layers during the animation.
    Object Model
    LayerTrack ClassKeyframe Class
    Syntax
    public sealed class LayerTrack : Track 
    Public NotInheritable Class LayerTrack 
       Inherits Track
    Example
    Create Layer Keyframe
    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);
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.Track
          ArcGIS.Desktop.Mapping.LayerTrack

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also