How to create a registration form carousel style animation

I am thinking in creating a registration form. The entries name and lastname appear first, with a continue button. When the continue button is pressed and the entries are validated, the next group of entries enter to screen while the current ones go out by the opposite site.

Any idea how can I create this? TranslateTo animation is an option?

Best Answer

  • LeonLuLeonLu Xamurai
    Accepted Answer

    Do you want to achieve the result like following GIF?

       public partial class MainPage : ContentPage, IAnimationPage
    {
        public MainPage()
        {
            InitializeComponent();
        }
    
        public IPageAnimation PageAnimation =>new PageAnimation { Duration = AnimationDuration.Long, Type=AnimationType.Push,Subtype= AnimationSubtype.FromLeft } ;
    
        public void OnAnimationFinished(bool isPopAnimation)
        {
            //throw new NotImplementedException();
        }
    
        public void OnAnimationStarted(bool isPopAnimation)
        {
           // throw new NotImplementedException();
        }
    
        private void Button_Clicked(object sender, EventArgs e)
        {
    
            Navigation.PushAsync(new Page1());
        }
    

    If so, you can use this plugin to achieve the animation.
    https://github.com/AlexandrNikulin/AnimationNavigationPage

    Here is my demo.

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    Accepted Answer

    Do you want to achieve the result like following GIF?

       public partial class MainPage : ContentPage, IAnimationPage
    {
        public MainPage()
        {
            InitializeComponent();
        }
    
        public IPageAnimation PageAnimation =>new PageAnimation { Duration = AnimationDuration.Long, Type=AnimationType.Push,Subtype= AnimationSubtype.FromLeft } ;
    
        public void OnAnimationFinished(bool isPopAnimation)
        {
            //throw new NotImplementedException();
        }
    
        public void OnAnimationStarted(bool isPopAnimation)
        {
           // throw new NotImplementedException();
        }
    
        private void Button_Clicked(object sender, EventArgs e)
        {
    
            Navigation.PushAsync(new Page1());
        }
    

    If so, you can use this plugin to achieve the animation.
    https://github.com/AlexandrNikulin/AnimationNavigationPage

    Here is my demo.

Sign In or Register to comment.