public void BeginTransition(TransitionPresenter transitionElement, UIElement oldContent, UIElement newContent) { var sb = new Storyboard(); var animation = CreateFadeOutAnimation(oldContent); sb.Children.Add(animation); sb.Duration = FadeLength; sb.Completed += (s, e) => { sb.Stop(); transitionElement.TransitionEnded(this, oldContent, newContent); }; sb.Begin(); }
public void BeginTransition(TransitionPresenter transitionElement, UIElement oldContent, UIElement newContent) { var sb = new Storyboard(); var animation = CreateFadeOutAnimation(oldContent); sb.Children.Add(animation); sb.Duration = FadeLength; sb.Completed += (s, e) =>{ sb.Stop(); transitionElement.TransitionEnded(this, oldContent, newContent); }; sb.Begin(); }