We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf80275 commit 168ea39Copy full SHA for 168ea39
Microsoft.Toolkit.Uwp.UI.Animations/Extensions/StoryboardAnimations.cs
@@ -23,7 +23,14 @@ public static Task BeginAsync(this Storyboard storyboard)
23
{
24
TaskCompletionSource<object?> taskCompletionSource = new TaskCompletionSource<object?>();
25
26
- storyboard.Completed += (_, _) => taskCompletionSource.SetResult(null);
+ void OnCompleted(object sender, object e)
27
+ {
28
+ ((Storyboard)sender).Completed -= OnCompleted;
29
+
30
+ taskCompletionSource.SetResult(null);
31
+ }
32
33
+ storyboard.Completed += OnCompleted;
34
35
storyboard.Begin();
36
0 commit comments