Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created October 21, 2019 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/2fe731fc231553422778f0f6245f465e to your computer and use it in GitHub Desktop.
Save juucustodio/2fe731fc231553422778f0f6245f465e 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 System;
using System.Collections.Generic;
using FormsControls.Base;
using Xamarin.Forms;
namespace DemoNavigation
{
public partial class SlidePage : ContentPage, IAnimationPage
{
public IPageAnimation PageAnimation { get; } = new SlidePageAnimation
{
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 SlidePage()
{
InitializeComponent();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment