protected override async Task OnDisappearingAnimationBeginAsync() { if (!IsAnimationEnabled) { return; } var taskSource = new TaskCompletionSource <bool>(); var currentHeight = FrameContainer.Height; await Task.WhenAll( mapNameLabel.FadeTo(0), FileNameEntry.FadeTo(0), SaveButton.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 override async Task OnAppearingAnimationEndAsync() { if (!IsAnimationEnabled) { return; } var translateLength = 400u; await Task.WhenAll( mapNameLabel.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), mapNameLabel.FadeTo(1), (new Func <Task>(async() => { await Task.Delay(200); await Task.WhenAll( FileNameEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), FileNameEntry.FadeTo(1)); }))()); await Task.WhenAll( SaveButton.ScaleTo(1), SaveButton.FadeTo(1)); }