Creating and implementing your own Custom Animations
In this section, we will take a look at how to we can work with Custom Animations, and implement these in your Xamarin.Forms
XAML and ContentPages
using C#. Custom Animations make use of the Animation
class, which essentially is the parent class for all Xamarin.Forms
animations, as well as making use of the extension methods contained in the ViewExtensions
class, to create one or a series of Animation objects.
Whenever you create an Animation
object, you'll need to specify a number of parameter objects, as well as include the starting and ending values for the property that is being animated. You will also need to ensure you declare a Callback
method that changes the value of the property.
You can also use the Animation
object to specify any number of child animations, which can be run in parallel, by calling the Commit
method and specifying the duration of the animation. Now that you have an understanding of what Custom Animations are,...