Esempio n. 1
0
        async Task SwipeAnimateOutAsync(int dir)
        {
            Poster.TranslateTo(500 * dir, Y);
            await Poster.RotateTo(100 *dir * 2);

            Poster.Rotation = 0;
        }
Esempio n. 2
0
        async Task SwipeAnimateInAsync()
        {
            TiltReset();
            await Poster.ScaleTo(0, 100);

            await Poster.TranslateTo(0, 0, 100);

            //card.BackgroundColor = Color.Transparent;
            Poster.Opacity = 0;
            Poster.FadeTo(1);
            await Poster.ScaleTo(1);
        }
        protected override async void OnDisappearing()
        {
            await Task.Run(async() =>
            {
                await OverView.TranslateTo(0, -Application.Current.MainPage.Height, 1, null);
                await Task.Run(() =>
                {
                    Poster.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                    Backdrop.TranslateTo(Application.Current.MainPage.Width + 20, 0, 1, null);
                });
                await ReleaseDate.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                await VoteAverage.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                await Genres.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                await BackDropInfo.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
            });

            this.Dispose();

            base.OnDisappearing();
        }
        protected override async void OnAppearing()
        {
            await Task.Run(async() =>
            {
                await OverView.TranslateTo(0, -Application.Current.MainPage.Height, 0, null);
                await Task.Run(() =>
                {
                    Poster.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                    Backdrop.TranslateTo(Application.Current.MainPage.Width + 20, 0, 1, null);
                });
                await ReleaseDate.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                await VoteAverage.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                await Genres.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
                await BackDropInfo.TranslateTo(-Application.Current.MainPage.Width + 20, 0, 1, null);
            });

            OverView.IsVisible     = true;
            Poster.IsVisible       = true;
            Backdrop.IsVisible     = true;
            ReleaseDate.IsVisible  = true;
            VoteAverage.IsVisible  = true;
            Genres.IsVisible       = true;
            BackDropInfo.IsVisible = true;
            Backdrop.Opacity       = 0.5;
            await Task.Run(async() =>
            {
                await OverView.TranslateTo(0, 0, 500, Easing.BounceOut);
                await Task.Run(() =>
                {
                    Poster.TranslateTo(0, 0, 1000, Easing.BounceOut);
                    Backdrop.TranslateTo(0, 0, 1000, Easing.BounceOut);
                });
                await ReleaseDate.TranslateTo(0, 0, 500, Easing.BounceOut);
                await VoteAverage.TranslateTo(0, 0, 500, Easing.BounceOut);
                await Genres.TranslateTo(0, 0, 500, Easing.BounceOut);
                await BackDropInfo.TranslateTo(0, 0, 500, Easing.BounceOut);
            });

            base.OnAppearing();
        }