Esempio n. 1
0
 private async Task TranslateCardFrame()
 {
     if (CardFrame.TranslationY < 100)
     {
         await CardFrame.TranslateTo(0, 0, 250);
     }
     else
     {
         await CardFrame.TranslateTo(0, 350, 250);
     }
 }
Esempio n. 2
0
        private async void PanUpdated(object sender, PanUpdatedEventArgs e)
        {
            switch (e.StatusType)
            {
            case GestureStatus.Running:
                await CardFrame.TranslateTo(0, e.TotalY, 100); break;

            case GestureStatus.Completed:
                await TranslateCardFrame(); break;

            case GestureStatus.Canceled:
                await TranslateCardFrame(); break;
            }
        }
Esempio n. 3
0
        private async void HandleTouchEnd()
        {
            if (CardFrame.TranslationX > animationSlideRange)
            {
                OnSwipeRight();
                return;
            }
            else if (CardFrame.TranslationX < -(animationSlideRange))
            {
                OnSwipeLeft();
                return;
            }

            await CardFrame.TranslateTo(0, 0, animLength, Easing.SpringOut);

            BackGrid.Opacity = 0;
            cardDistance     = (float)X;
            sliding          = false;
        }