示例#1
0
        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();
        }
示例#2
0
        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();
        }