Exemplo n.º 1
0
 private void DoEnter(Action onEnterCompleted)
 {
     if (CanAnimateInternal && EntranceAnimation != null)
     {
         var storyboard = GetEntranceAnimationStoryboardInResources();
         entranceStoryboardAccessor = new StoryboardAccessor(storyboard);
         entranceStoryboardAccessor.HandleCompleted(() =>
         {
             entranceStoryboardAccessor.UnhandleCompleted();
             onEnterCompleted();
         });
         storyboard.Begin(mainGrid, true);
     }
     else
     {
         onEnterCompleted();
     }
 }
 /// <summary>
 /// Plays the entrance transition.
 /// </summary>
 public void DoEnter()
 {
     if (EntranceTransition != null)
     {
         var storyboard = GetEntranceTransitionStoryboardInResources();
         entranceStoryboardAccessor = new StoryboardAccessor(storyboard);
         entranceStoryboardAccessor.HandleCompleted(() =>
         {
             entranceStoryboardAccessor.UnhandleCompleted();
             OnTransitionCompleted();
         });
         storyboard.Begin(mainGrid, true);
     }
     else
     {
         OnTransitionCompleted();
     }
 }
Exemplo n.º 3
0
        private void DoLeave(Action onLeaveCompleted)
        {
            if (CanAnimateInternal && ExitAnimation != null)
            {
                var storyboard = GetExitAnimationStoryboardInResources();
                exitStoryboardAccessor = new StoryboardAccessor(storyboard);
                exitStoryboardAccessor.HandleCompleted(() =>
                {
                    exitStoryboardAccessor.UnhandleCompleted();
                    onLeaveCompleted();
                });

                storyboard.Begin(mainGrid, true);
            }
            else
            {
                onLeaveCompleted();
            }
        }