private async Task DropInCard(uint duration) { TopIcon.Rotation = 100; TopIcon.RotationX = 120; TopIcon.Opacity = 0; var durationFade = (uint)(duration * 0.75); var durationXRotation = (uint)(duration * 0.7); await Task.WhenAll( TopIcon.FadeTo(1, durationFade), TopIcon.RotateTo(0, duration, Easing.SpringOut), TopIcon.RotateXTo(0, durationXRotation, Easing.SpringOut) ); }
private async Task FlipImageTo(ImageSource newImage) { if (TopIcon.Source == newImage) { return; } await Task.WhenAll( TopIcon.RotateYTo(90, 250, Easing.SinIn), TopIcon.FadeTo(0, 150) ); TopIcon.Source = newImage; TopIcon.RotationY = -90; await Task.WhenAll( TopIcon.RotateYTo(0, 250, Easing.SinIn), TopIcon.FadeTo(100, 150) ); }