ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Animation Class / ScaleDuration Method / ScaleDuration(Double) Method
The factor to scale by.
Example

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

    Parameters

    factor
    The factor to scale by.
    Example
    Set Animation Length
    {
      var animation = mapView.Map.Animation;
      var duration = animation.Duration;
      if (duration == TimeSpan.Zero)
        return;
    
      var factor = length.TotalSeconds / duration.TotalSeconds;
      animation.ScaleDuration(factor);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also