我有类似于这样的代码:
barProgress.BeginAnimation(RangeBase.ValueProperty, new DoubleAnimation( barProgress.Value, dNextProgressValue, new Duration(TimeSpan.FromSeconds(dDuration)));
现在,你如何停止这个动画(即DoubleAnimation
)?我想要这么做是因为我想开始新的动画(貌似这行得通,但很难确定),并最终停止上一个动画......
BeginAnimation
似乎不能停止第一次动画的“时钟”继续前进。经过指定时间后,动画会引发Completed
事件。它不是在调用BeginAnimation
时直接引发,而是在动画完成时引发。 - BatteryBackupUnitmyStoryboard.Begin(containingObject:=Me, isControllable:=True, handoffBehavior:=Animation.HandoffBehavior.SnapshotAndReplace)
- Herry MarkowitzNothing
。-- https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/nothing - BrainSlugs83