コード例 #1
0
ファイル: LoginPage.xaml.cs プロジェクト: PlayBlue7/SKDPublic
        private void PanGestureRecognizer_PanUpdated(object sender, PanUpdatedEventArgs e)
        {
            if (animationStarted)
            {
                return;
            }

            if (LogoImage.TranslationY > -50 && LogoImage.TranslationY <= 0)
            {
                LogoImage.TranslationY += e.TotalY;
                if (LogoImage.TranslationY > 0)
                {
                    LogoImage.TranslationY = 0;
                }
                return;
            }

            animationStarted = true;
            Animating?.Invoke();
            MaterialFrame.FadeTo(0.99, 160u * (uint)InputSL.Children.Count, Easing.CubicInOut); // Opacity 1.0 causes text above to become blurred?
            LogoImage.TranslateTo(0, Height * -0.35d, 400, Easing.CubicOut);
            TitleSL.FadeTo(1, 600, Easing.CubicInOut);
            TitleSL.TranslateTo(0, 0, 600, Easing.CubicInOut);
            ChevronSL.FadeTo(0, 100, Easing.CubicOut);
            EmailEntry.IsEnabled = PasswordEntry.IsEnabled = PasswordConfirmationEntry.IsEnabled = true;
            int t = 0;

            foreach (VisualElement v in InputSL.Children)
            {
                t += 160;
                v.TranslationX = -v.Width;
                Device.StartTimer(TimeSpan.FromMilliseconds(t), () =>
                {
                    if (!_signUp)
                    {
                        if (v == Button)
                        {
                            v.TranslateTo(0, -(PasswordConfirmationSL.Height + 4), 400, Easing.SinOut);
                            v.FadeTo(1, 400, Easing.SinOut);
                            return(false);
                        }
                        else if (v == PasswordConfirmationSL)
                        {
                            v.TranslateTo(0, 0, 400, Easing.SinOut);
                            return(false);
                        }
                    }
                    v.TranslateTo(0, 0, 400, Easing.SinOut);
                    v.FadeTo(1, 400, Easing.SinOut);
                    return(false);
                });
            }
            ThemeEngine.RefreshTheme(); // Set nav colours to what they should be on android
        }
コード例 #2
0
        private void PanGestureRecognizer_PanUpdated(object sender, PanUpdatedEventArgs e)
        {
            if (animationStarted)
            {
                return;
            }

            if (LogoImage.TranslationY > -50 && LogoImage.TranslationY <= 0)
            {
                LogoImage.TranslationY += e.TotalY;
                if (LogoImage.TranslationY > 0)
                {
                    LogoImage.TranslationY = 0;
                }
                return;
            }

            animationStarted = true;
            Animating?.Invoke();
            MaterialFrame.FadeTo(0.99, 160u * (uint)ButtonSL.Children.Count, Easing.CubicInOut); // Opacity 1.0 causes text above to become blurred?
            LogoImage.TranslateTo(0, Height * -0.35d, 400, Easing.CubicOut);
            TitleSL.FadeTo(1, 600, Easing.CubicInOut);
            TitleSL.TranslateTo(0, 0, 600, Easing.CubicInOut);
            ChevronSL.FadeTo(0, 100, Easing.CubicOut);
            int t = 0;

            foreach (Frame f in ButtonSL.Children)
            {
                t += 160;
                f.TranslationX = -f.Width;
                Device.StartTimer(TimeSpan.FromMilliseconds(t), () =>
                {
                    f.TranslateTo(0, 0, 400, Easing.SinOut);
                    f.FadeTo(1, 400, Easing.SinOut);
                    return(false);
                });
            }
            ThemeEngine.RefreshTheme(); // Set nav colours to what they should be on android
        }