private async void pacManAnimate() { double pacmanwidth = pacMananimation.Width; var mainDisplayInfo = DeviceDisplay.MainDisplayInfo.Width; pacMananimation.IsVisible = true; await pacMananimation.TranslateTo(-mainDisplayInfo / 2, 0, 0); await Task.WhenAny <bool> ( pacMananimation.TranslateTo(((mainDisplayInfo * 34) / 100), 0, 5000, Easing.Linear) ); QtaRefresh(); MessagingCenter.Send(new AllSnacksPage() { }, "RefreshGetSnacks"); await pacMananimation.TranslateTo(((mainDisplayInfo * 66) / 100), 0, 2500); }
private async Task ValidLoginAnimation() { await LoginContainer.FadeTo(0, 250); AnimationView.Opacity = 1; await AnimationView.TranslateTo(0, 0, 2000, Easing.SinInOut); ConfettiView.Opacity = 1; ConfettiView.Play(); ConfettiView.OnFinish += ConfettiView_OnFinish; await Task.Delay(1000); await AnimationView.TranslateTo(300, 0, 2000, Easing.SinInOut); AnimationView.Opacity = 0; }