Esempio n. 1
0
        /// <summary>
        /// Completes a transition operation by stopping it, restoring
        /// interactivity, and then firing the OnEndTransition event.
        /// </summary>
        /// <param name="navigationTransition">The navigation transition.</param>
        /// <param name="presenter">The content presenter.</param>
        /// <param name="transition">The transition instance.</param>
        private static void CompleteTransition(TelegramNavigationTransition navigationTransition, ContentPresenter presenter, ITransition transition)
        {
            if (transition != null)
            {
                transition.Stop();
            }

            RestoreContentPresenterInteractivity(presenter);

            if (navigationTransition != null)
            {
                navigationTransition.OnEndTransition();
                //var dynMethod = navigationTransition.GetType().GetMethod("OnEndTransition", BindingFlags.NonPublic | BindingFlags.Instance);
                //dynMethod.Invoke(navigationTransition, new object[] { });
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Performs a transition when given the appropriate components,
 /// includes calling the appropriate start event and ensuring opacity
 /// on the content presenter.
 /// </summary>
 /// <param name="navigationTransition">The navigation transition.</param>
 /// <param name="presenter">The content presenter.</param>
 /// <param name="transition">The transition instance.</param>
 private static void PerformTransition(TelegramNavigationTransition navigationTransition, ContentPresenter presenter, ITransition transition)
 {
     if (navigationTransition != null)
     {
         navigationTransition.OnBeginTransition();
         //var dynMethod = navigationTransition.GetType().GetMethod("OnBeginTransition", BindingFlags.NonPublic | BindingFlags.Instance);
         //dynMethod.Invoke(navigationTransition, new object[] { });
     }
     if (presenter != null && presenter.Opacity != 1)
     {
         presenter.Opacity = 1;
     }
     if (transition != null)
     {
         transition.Begin();
     }
 }