示例#1
0
        private async Task AnimatePrompt(string arg)
        {
            await AnimateLoginStop();

            PromptLabel.Text      = arg;
            LoginButton.IsEnabled = false;
            LoginEntry.TextColor  = Color.Red;
            await LoginEntry.TranslateTo(-10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(-10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(-10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(0, 0, 100, Easing.Linear);

            await ArrowFrame.TranslateTo(0, 0, 1000, Easing.Linear);

            await PromptFrame.ScaleTo(1, 500, Easing.Linear);

            await Task.Delay(5000);

            await PromptFrame.ScaleTo(0, 500, Easing.Linear);

            await ArrowFrame.TranslateTo(0, 2000, 1000, Easing.Linear);

            LoginEntry.TextColor  = Color.Black;
            LoginButton.IsEnabled = true;
        }
示例#2
0
        private async Task AnimateLoginAsync()
        {
            LoginEntry.TextColor        = Color.Red;
            LoginEntry.PlaceholderColor = Color.Red;

            await LoginEntry.TranslateTo(-10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(-10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(-10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(10, 0, 100, Easing.Linear);

            await LoginEntry.TranslateTo(0, 0, 100, Easing.Linear);

            LoginEntry.PlaceholderColor = Color.LightGray;

            LoginEntry.TextColor = Color.LightGray;
        }