예제 #1
0
        protected override async Task OnDisappearingAnimationBeginAsync()
        {
            if (!IsAnimationEnabled)
            {
                return;
            }

            var taskSource = new TaskCompletionSource <bool>();

            var currentHeight = FrameContainer.Height;

            await Task.WhenAll(
                MasageEditor.FadeTo(0),
                GetMasageButton.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;
        }
예제 #2
0
        protected override async Task OnAppearingAnimationEndAsync()
        {
            if (!IsAnimationEnabled)
            {
                return;
            }

            var translateLength = 400u;

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

            await Task.WhenAll(
                CloseImage.FadeTo(1),
                CloseImage.ScaleTo(1, easing: Easing.SpringOut),
                CloseImage.RotateTo(0),
                GetMasageButton.ScaleTo(1),
                GetMasageButton.FadeTo(1));
        }