Skip to content

Instantly share code, notes, and snippets.

@biapar
Forked from juucustodio/RotatePage.xaml.cs
Created December 10, 2019 15:25
Show Gist options
  • Save biapar/a3718474d2cb80f30c7fd7c4b0ce0fa6 to your computer and use it in GitHub Desktop.
Save biapar/a3718474d2cb80f30c7fd7c4b0ce0fa6 to your computer and use it in GitHub Desktop.
Example of setting page navigation animations for your Xamarin.Forms applications - http://julianocustodio.com/animationnavigationpage
using FormsControls.Base;
using Xamarin.Forms;
namespace DemoNavigation
{
public partial class RotatePage : ContentPage, IAnimationPage
{
public IPageAnimation PageAnimation { get; } = new RotatePageAnimation
{
Duration = AnimationDuration.Long,
Subtype = AnimationSubtype.FromLeft
};
public void OnAnimationStarted(bool isPopAnimation)
{
// Put your code here but leaving empty works just fine
}
public void OnAnimationFinished(bool isPopAnimation)
{
// Put your code here but leaving empty works just fine
}
public RotatePage()
{
InitializeComponent();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment