예제 #1
0
        protected async override Task OnAppearingAnimationEnd()
        {
            var translateLength = 400u;

            await Task.WhenAll(
                WineVintage.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength),
                WineVintage.FadeTo(1),
                (new Func <Task>(async() =>
            {
                await Task.Delay(200);
                await Task.WhenAll(
                    WineVintage.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength),
                    WineVintage.FadeTo(1));
            }))());

            await Task.WhenAll(
                CloseImage.FadeTo(1),
                CloseImage.ScaleTo(1, easing: Easing.SpringOut),
                CloseImage.RotateTo(0),
                OKButton.ScaleTo(1),
                OKButton.FadeTo(1));
        }
예제 #2
0
        protected async override Task OnDisappearingAnimationBegin()
        {
            var taskSource = new TaskCompletionSource <bool>();

            var currentHeight = FrameContainer.Height;

            await Task.WhenAll(
                WineVintage.FadeTo(0),
                OKButton.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;
        }