Created
October 21, 2019 02:01
-
-
Save juucustodio/882e5eed750fd70d27e4e3c4d896d8e6 to your computer and use it in GitHub Desktop.
Example of setting page navigation animations for your Xamarin.Forms applications - http://julianocustodio.com/animationnavigationpage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FormsControls.Base; | |
using Xamarin.Forms; | |
namespace DemoNavigation | |
{ | |
public partial class RollPage : ContentPage, IAnimationPage | |
{ | |
public IPageAnimation PageAnimation { get; } = new RollPageAnimation | |
{ | |
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 RollPage() | |
{ | |
InitializeComponent(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment