diff --git a/src/Avalonia.Base/Animation/Animation.cs b/src/Avalonia.Base/Animation/Animation.cs index 0b3772f7fa..5f15f14534 100644 --- a/src/Avalonia.Base/Animation/Animation.cs +++ b/src/Avalonia.Base/Animation/Animation.cs @@ -295,8 +295,9 @@ namespace Avalonia.Animation return (newAnimatorInstances, subscriptions, animatesVisibility); } - IDisposable IAnimation.Apply(Animatable control, IClock? clock, IObservable match, Action? onComplete) - => Apply(control, clock, match, onComplete, isManuallyStarted: false); + IDisposable IAnimation.Apply(Animatable control, IClock? clock, IObservable match, Action? onComplete, + bool isManuallyStarted) + => Apply(control, clock, match, onComplete, isManuallyStarted); /// internal IDisposable Apply(Animatable control, IClock? clock, IObservable match, Action? onComplete, diff --git a/src/Avalonia.Base/Animation/IAnimation.cs b/src/Avalonia.Base/Animation/IAnimation.cs index a5b8b75b12..53146a3edd 100644 --- a/src/Avalonia.Base/Animation/IAnimation.cs +++ b/src/Avalonia.Base/Animation/IAnimation.cs @@ -14,7 +14,8 @@ namespace Avalonia.Animation /// /// Apply the animation to the specified control and run it when produces true. /// - internal IDisposable Apply(Animatable control, IClock? clock, IObservable match, Action? onComplete = null); + internal IDisposable Apply(Animatable control, IClock? clock, IObservable match, + Action? onComplete = null, bool isManuallyStarted = false); /// /// Run the animation on the specified control. diff --git a/src/Avalonia.Base/Styling/StyleInstance.cs b/src/Avalonia.Base/Styling/StyleInstance.cs index c397aef8c6..1ecaf3734a 100644 --- a/src/Avalonia.Base/Styling/StyleInstance.cs +++ b/src/Avalonia.Base/Styling/StyleInstance.cs @@ -72,7 +72,8 @@ namespace Avalonia.Styling _animationTrigger ??= new LightweightSubject(); _animationApplyDisposables ??= new List(); foreach (var animation in _animations) - _animationApplyDisposables.Add(animation.Apply(animatable, null, _animationTrigger)); + _animationApplyDisposables.Add(animation.Apply(animatable, null, _animationTrigger, + onComplete: null, isManuallyStarted: false)); if (_activator is null) _animationTrigger.OnNext(true);