Parameters
- factor
- The factor to scale by.
public void SetAnimationLength(TimeSpan length) { var mapView = MapView.Active; if (mapView != null) return; var animation = mapView.Map.Animation; var duration = animation.Duration; if (duration == TimeSpan.Zero) return; var factor = length.TotalSeconds / duration.TotalSeconds; animation.ScaleDuration(factor); }
Target Platforms: Windows 11, Windows 10