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; } } }
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); }
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); }
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); }