Skip to content

Commit 71608cc

Browse files
committed
Renamed AnimationSet.Ended to Completed
1 parent 7039036 commit 71608cc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Microsoft.Toolkit.Uwp.UI.Animations/Xaml/AnimationSet.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public sealed class AnimationSet : DependencyObjectCollection
3434
/// <summary>
3535
/// Raised whenever the current animation ends.
3636
/// </summary>
37-
public event EventHandler? Ended;
37+
public event EventHandler? Completed;
3838

3939
/// <summary>
4040
/// An interface representing a node in an <see cref="AnimationSet"/> instance.
@@ -73,7 +73,7 @@ public async void Start()
7373
// Here we're using an async void method on purpose, in order to be able to await
7474
// the completion of the animation and rethrow exceptions. We can't just use the
7575
// synchronous AnimationBuilder.Start method here, as we also need to await for the
76-
// animation to complete in either case in order to raise the Ended event when that
76+
// animation to complete in either case in order to raise the Completed event when that
7777
// happens. So we add an async state machine here to work around this.
7878
await StartAsync();
7979
}
@@ -181,7 +181,7 @@ public async Task StartAsync(UIElement element, CancellationToken token)
181181
await builder.StartAsync(element, token);
182182
}
183183

184-
Ended?.Invoke(this, EventArgs.Empty);
184+
Completed?.Invoke(this, EventArgs.Empty);
185185
}
186186

187187
/// <summary>

Microsoft.Toolkit.Uwp.UI.Behaviors/Animations/AnimationEndBehavior.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ private void SetResolvedCollection(AnimationSet? animationCollection)
4848

4949
if (this.animationCollection is not null)
5050
{
51-
this.animationCollection.Ended -= AnimationCollection_Ended;
51+
this.animationCollection.Completed -= AnimationCollection_Completed;
5252
}
5353

5454
this.animationCollection = animationCollection;
5555

5656
if (animationCollection is not null)
5757
{
58-
animationCollection.Ended += AnimationCollection_Ended;
58+
animationCollection.Completed += AnimationCollection_Completed;
5959
}
6060
}
6161

@@ -64,7 +64,7 @@ private void SetResolvedCollection(AnimationSet? animationCollection)
6464
/// </summary>
6565
/// <param name="sender">The source <see cref="AnimationSet"/> instance.</param>
6666
/// <param name="e">The arguments for the event (unused).</param>
67-
private void AnimationCollection_Ended(object sender, System.EventArgs e)
67+
private void AnimationCollection_Completed(object sender, System.EventArgs e)
6868
{
6969
Interaction.ExecuteActions(sender, Actions, e);
7070
}

0 commit comments

Comments
 (0)