protected override async void OnAppearingAnimationEnd() { if (!IsAnimationEnabled) { return; } var translateLength = 400u; await Task.WhenAll( UsernameEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), UsernameEntry.FadeTo(1), (new Func <Task>(async() => { await Task.Delay(200); await Task.WhenAll( PasswordEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), PasswordEntry.FadeTo(1)); }))()); await Task.WhenAll( CloseImage.FadeTo(1), CloseImage.ScaleTo(1, easing: Easing.SpringOut), CloseImage.RotateTo(0), LoginButton.ScaleTo(1), LoginButton.FadeTo(1)); }
protected override async Task OnDisappearingAnimationBeginAsync() { var taskSource = new TaskCompletionSource <bool>(); var currentHeight = FrameContainer.Height; await Task.WhenAll( UsernameEntry.FadeTo(0), PasswordEntry.FadeTo(0), LoginButton.FadeTo(0)); FrameContainer.Animate("HideAnimation", d => { FrameContainer.HeightRequest = d; }, start: currentHeight, end: 170, finished: async(d, b) => { await Task.Delay(300); taskSource.TrySetResult(true); }); await taskSource.Task; }
protected async override Task OnAppearingAnimationEnd() { var translateLength = 400u; await Task.WhenAll( Nombre.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), Apellido.FadeTo(1)); await Task.WhenAll( UsernameEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), UsernameEntry.FadeTo(1), Profesion.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), Profesion.FadeTo(1), (new Func <Task>(async() => { await Task.Delay(200); await Task.WhenAll( PasswordEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), PasswordEntry.FadeTo(1)); }))()); await Task.WhenAll( LoginButton.ScaleTo(1), LoginButton.FadeTo(1)); }
private void ShowControls() { BackLabel.TranslateTo(0, 0, AnimationSpeed); EmailEntry.TranslateTo(0, 0, AnimationSpeed); PasswordEntry.TranslateTo(0, 0, AnimationSpeed); BackLabel.FadeTo(1, AnimationSpeed); EmailEntry.FadeTo(1, AnimationSpeed); PasswordEntry.FadeTo(1, AnimationSpeed); }
private void StartLayout() { BackLabel.FadeTo(0, 1); EmailEntry.FadeTo(0, 1); PasswordEntry.FadeTo(0, 1); BackLabel.TranslateTo(0, 30, 1); EmailEntry.TranslateTo(0, -60, 1); PasswordEntry.TranslateTo(0, -60, 1); }
private void HideControls() { BackLabel.FadeTo(0, AnimationSpeed); EmailEntry.FadeTo(0, AnimationSpeed); PasswordEntry.FadeTo(0, AnimationSpeed); BackLabel.TranslateTo(0, 30, AnimationSpeed); EmailEntry.TranslateTo(0, -60, AnimationSpeed); PasswordEntry.TranslateTo(0, -60, AnimationSpeed); }
protected override async Task OnAppearingAnimationEndAsync() { if (!IsAnimationEnabled) { return; } var translateLength = 400u; await Task.WhenAll( UsernameEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), UsernameEntry.FadeTo(1), (new Func <Task>(async() => { await Task.Delay(100); await Task.WhenAll( EmailEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), EmailEntry.FadeTo(1) ); }))(), (new Func <Task>(async() => { await Task.Delay(100); await Task.WhenAll( PasswordEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), PasswordEntry.FadeTo(1) ); }))(), (new Func <Task>(async() => { await Task.Delay(100); await Task.WhenAll( PasswordConfirmEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), PasswordConfirmEntry.FadeTo(1) ); }))(), (new Func <Task>(async() => { await Task.Delay(100); await Task.WhenAll( PhoneNumberEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), PhoneNumberEntry.FadeTo(1) ); }))() ); await Task.WhenAll( RegisterButton.ScaleTo(1), RegisterButton.FadeTo(1) ); RegisterButton.IsEnabled = false; }
protected override async Task OnAppearingAnimationEndAsync() { if (!IsAnimationEnabled) { return; } var translateLength = 400u; await Task.WhenAll( UsernameEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), UsernameEntry.FadeTo(1), (new Func <Task>(async() => { await Task.Delay(150); await Task.WhenAll( PasswordEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), PasswordEntry.FadeTo(1) ); }))(), (new Func <Task>(async() => { await Task.Delay(300); await Task.WhenAll( RememberCheckBox.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), RememberCheckBox.FadeTo(1) ); }))() ); await Task.WhenAll( //CloseImage.FadeTo(1), //CloseImage.ScaleTo(1, easing: Easing.SpringOut), //CloseImage.RotateTo(0), LoginButton.ScaleTo(1), LoginButton.FadeTo(1), RegisterButton.ScaleTo(1), RegisterButton.FadeTo(1), OrEntry.ScaleTo(1), OrEntry.FadeTo(1) ); LoginButton.IsEnabled = false; }
private async Task AnimateLoginStart() { await Task.Run(() => { LoginEntry.FadeTo(0, 500, Easing.Linear); PasswordEntry.FadeTo(0, 500, Easing.Linear); LoginButton.FadeTo(0, 500, Easing.Linear); }); await LogoImage.TranslateTo(0, 50, 1000, Easing.Linear); while ((BindingContext as LoginPageViewModel).Busy) { await LogoImage.FadeTo(1, 600); await LogoImage.FadeTo(0, 600); } }