Exemple #1
0
        private void ActivateFrame()
        {
            var oldPresenter = _backPresenter;
            var newPresenter = _fontPresenter;

            if (!IsLoaded)
            {
                return;
            }
            if (oldPresenter != null && newPresenter != null)
            {
                ITransitionWipe wipe = TransitionWipe;
                if (wipe == null)
                {
                    wipe = this.TransitionWipeSelector.ProviderTransitionWipeFrom(oldPresenter, newPresenter, this);
                }
                if (wipe != null)
                {
                    var origin = TransitionOrigin ?? new Point();
                    wipe.Wipe(oldPresenter, newPresenter, origin, this);
                }
                else
                {
                    DoStack(newPresenter, oldPresenter);
                    if (oldPresenter != null)
                    {
                        oldPresenter.Visibility = Visibility.Hidden;
                    }
                }
            }
            else if (oldPresenter != null || newPresenter != null)
            {
                DoStack(oldPresenter ?? newPresenter);
                if (oldPresenter != null)
                {
                    oldPresenter.Visibility = Visibility.Hidden;
                }
            }
        }
Exemple #2
0
 public bool Match(Transitioner transitioner, TransitionerSlide oldSlide, TransitionerSlide newSlide, int oldIndex, int newIndex, int count, out ITransitionWipe wipe)
 {
     wipe = newIndex > oldIndex ? ForwardWipe : BackwardWipe;
     return(true);
 }
Exemple #3
0
 public bool Match(Transitioner transitioner, TransitionerSlide oldSlide, TransitionerSlide newSlide, int oldIndex, int newIndex, int count, out ITransitionWipe wipe)
 {
     if (Wipes.Count > 0)
     {
         wipe = Wipes[_random.Next(0, Wipes.Count - 1)];
     }
     else
     {
         wipe = _wipes[_random.Next(0, _wipes.Count - 1)];
     }
     return(true);
 }
Exemple #4
0
 public bool Match(Transitioner transitioner, TransitionerSlide oldSlide, TransitionerSlide newSlide, int oldIndex, int newIndex, int count, out ITransitionWipe wipe)
 {
     foreach (var item in this)
     {
         if (item.Match(transitioner, oldSlide, newSlide, oldIndex, newIndex, count, out wipe))
         {
             return(true);
         }
     }
     wipe = null;
     return(false);
 }