private void StoryBoardPlay(IAnimation animation) { if (this.animation != null) { this.animation.Cancel(); } this.animation = animation; sb.CancelAsyncAnimate(); sb.Clear(); sb.AddAnimations(this.animation, // hack? implement it better? new CommitStoryboardAnimation() { StartsAt = 400, Duration = 500, CommitAction = () => { this.IsPanoramaAnimating = false; } } ); sb.BeginAnimate(); }