ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Animation Class / ScaleDuration Method / ScaleDuration(TimeSpan,TimeSpan,Double) Method
The start time to scale.
The end time to scale
The factor to scale by.
Example

In This Topic
    ScaleDuration(TimeSpan,TimeSpan,Double) Method
    In This Topic
    Adjust the length of the track by a given scale factor.
    Syntax
    public void ScaleDuration( 
       TimeSpan start,
       TimeSpan end,
       double factor
    )
    Public Overloads Sub ScaleDuration( _
       ByVal start As TimeSpan, _
       ByVal end As TimeSpan, _
       ByVal factor As Double _
    ) 

    Parameters

    start
    The start time to scale.
    end
    The end time to scale
    factor
    The factor to scale by.
    Example
    Scale Animation
    public void ScaleAnimationAfterTime(TimeSpan afterTime, TimeSpan length)
    {
      var mapView = MapView.Active;
      if (mapView != null)
        return;
    
      var animation = mapView.Map.Animation;
      var duration = animation.Duration;
      if (duration == TimeSpan.Zero || duration <= afterTime)
        return;
    
      var factor = length.TotalSeconds / (duration.TotalSeconds - afterTime.TotalSeconds);
      animation.ScaleDuration(afterTime, duration, factor);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also