Xamarin.Forms compound animations

Compound animations give you the ability to combine multiple animations as a storyboard. Let's replace the preceding function with our new implementation using a compound animation as follows:

private async Task AnimateFocalTarget(Point touchPoint) { _focalTarget.TintColorString = "#007F00"; var storyboard = new Animation(); var translationX = new Animation(callback: x => _focalTarget.TranslationX = x, start: touchPoint.X, end: touchPoint.X - (IMG_TARGET_BOUND / 2), easing: Easing.Linear); var translationY = new Animation(callback: y => _focalTarget.TranslationY = y, start: touchPoint.Y, end: touchPoint.Y - (IMG_TARGET_BOUND / 2), easing: Easing.Linear); var scaleFirst = new Animation(callback: o => _focalTarget.Scale ...

Get Xamarin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.