Vertical page animation transition in Xamarin Forms?

Viewed 690

Is it possible to somehow get the Navigation Page transition to pop a page off vertically (say, slide off in the up direction) rather than the horizontal direction?

1 Answers

You can use Animation Navigation Page nuget available here.

enter image description here enter image description here

Override the default Page Transitions for Xamarin.Forms when calling PushAsync and PopAsync.

Using the AnimationNavigationPage you can create a custom transition between different pages.

Usage:

  1. Install nuget package for PCL/Net.Standard, IOS and Android projects. Then add the lines below.
    • Android: Add 'FormsControls.Droid.Main.Init()' into MainActivity.cs of your Xamarin Droid Project. enter image description here
    • iOS: Add 'FormsControls.Touch.Main.Init()' into AppDelegate.cs of your Xamarin.iOS Project. enter image description here
  2. Declare AnimationNavigationPage: enter image description here
  3. Create and Animation page
    • Firstly, make sure that the code behind inherits from AnimationPage: enter image description here
    • Next, use the 'controls:AnimationPage' tag instead of the 'ContentPage' tag as follows: enter image description here
    • Lastly, we must declare a tag in the page to specify which transition we would like to use: enter image description here

Please refer to this link to see full documentation.

Related