ArcGIS Pro 3.4 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 Version

ScaleDuration(TimeSpan,TimeSpan,Double) Method
Adjust the length of the track by a given scale factor.
Syntax
public void ScaleDuration( 
   TimeSpan start,
   TimeSpan end,
   double factor
)

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