To provide the ability for the update of the MainPage property to show animation during transition, of the page of it being changed to.
There are three ways to approach this and I am not sure which would fit best.
Provide a property in Application.cs to set a pre-existing animation. e.g.
Application.Current.MainPageAnimation = Animation.SlideInFromLeft
Provide a method to do only do the animated transition during a set. e.g.
These first 2 assume that Xamarin Forms will control the transition and not provide any customization. The next point, is expanding it to be able to add custom animations.
Give control of animations to the platform. In the platform, define the animation. This is an Android example.
Xamarin.Forms.Platform.Android.Platform.RegisterAnimation("AnimationName", Application.Current.AnimationUtils.LoadAnimation(_context, global::Android.Resource.Animation.SlideInLeft);
Then set the animation via the string, based on either choice of the first 2 points.
A common pattern to separate the login screens with the main application is to change the MainPage property in Application. Some MVVM frameworks also rely on this, such as FreshMVVM and Exrin. This would allow the ability to provide an animation when transitioning between different Pages at the root level.