コード例 #1
0
        protected override async Task OnDisappearingAnimationBeginAsync()
        {
            if (!IsAnimationEnabled)
            {
                return;
            }

            var taskSource = new TaskCompletionSource <bool>();

            var currentHeight = FrameContainer.Height;

            heightContainer     = FrameContainer.Height;
            heightContainerBool = true;

            await Task.WhenAll(
                test.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 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;
        }
コード例 #3
0
        protected override async Task OnDisappearingAnimationBeginAsync()
        {
            if (!IsAnimationEnabled)
            {
                return;
            }

            var taskSource = new TaskCompletionSource <bool>();

            var currentHeight = FrameContainer.Height;

            await Task.Run(() => Parallel.ForEach(PageStack.Children, (c) => c.FadeTo(0)));

            FrameContainer.Animate("HideAnimation", d =>
            {
                FrameContainer.HeightRequest = d;
            },
                                   start: currentHeight,
                                   end: currentHeight + 20,
                                   finished: async(d, b) =>
            {
                await Task.Delay(100);
                taskSource.TrySetResult(true);
            });

            await taskSource.Task;
        }
コード例 #4
0
        protected async override Task OnDisappearingAnimationBegin()
        {
            pickerClass.Opacity = pickerStream.Opacity = pickerSection.Opacity = btnOK.Opacity = 0;

            var taskSource = new TaskCompletionSource <bool>();

            var currentHeight = FrameContainer.Height;

            await Task.WhenAll(
                pickerClass.FadeTo(0),
                pickerStream.FadeTo(0),
                pickerSection.FadeTo(0),
                btnOK.FadeTo(0),
                CloseImage.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;
        }
コード例 #5
0
        protected async override void OnDisappearingAnimationBegin()
        {
            var taskSource = new TaskCompletionSource<bool>();

            var currentHeight = FrameContainer.Height;
            
            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;
        }
コード例 #6
0
        protected override async Task OnDisappearingAnimationBeginAsync()
        {
            if (!IsAnimationEnabled)
            {
                return;
            }

            var taskSource = new TaskCompletionSource <bool>();

            var currentHeight = FrameContainer.Height;

            //await Task.WhenAll(
            //    HabitEntry.FadeTo(0),
            //    DescriptionLabel.FadeTo(0),
            //    DescriptionEditor.FadeTo(0),
            //    StartPicker.FadeTo(0),
            //    EndPicker.FadeTo(0),
            //    EndPicker.FadeTo(0)

            //    ErrorLabel.FadeTo(0),
            //    LoadingActivityIndicator.FadeTo(0)
            //    );

            await Task.Run(() => Parallel.ForEach(PageStack.Children, (c) => c.FadeTo(0)));

            FrameContainer.Animate("HideAnimation", d =>
            {
                FrameContainer.HeightRequest = d;
            },
                                   start: currentHeight,
                                   end: currentHeight + 20,
                                   finished: async(d, b) =>
            {
                await Task.Delay(100);
                taskSource.TrySetResult(true);
            });

            await taskSource.Task;
        }