internal async Task ExpandToFill(Rectangle bounds) { // set the intial state AddBackground.Opacity = .5; AddButton.Opacity = 1; NameLabel.Opacity = 1; PriceLabel.Opacity = 1; // destination rect var destRect = new Rectangle( x: (bounds.Width / 2) - (this.Width / 2), y: 40, width: this.Width, height: this.Height ); _ = AddBackground.FadeTo(0, animationSpeed / 2); _ = AddButton.FadeTo(0, animationSpeed / 2); _ = NameLabel.FadeTo(0, animationSpeed / 2); _ = PriceLabel.FadeTo(0, animationSpeed / 2); await this.LayoutTo(destRect, animationSpeed * 2, Easing.SinInOut); await this.LayoutTo(bounds.Inflate(50, 50), animationSpeed * 2, Easing.SinInOut); }
// Method for animation child in PopupPage // Invoced after custom animation end protected async override Task OnAppearingAnimationEnd() { var translateLength = 400u; await Task.WhenAll( myGrid.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), myGrid.FadeTo(1), CloseImage.FadeTo(1), CloseImage.ScaleTo(1, easing: Easing.SpringOut), CloseImage.RotateTo(0), AddButton.ScaleTo(1), AddButton.FadeTo(1)); }
protected override async Task OnAppearingAnimationEndAsync() { if (!IsAnimationEnabled) { return; } await Task.WhenAll( AddButton.ScaleTo(1), AddButton.FadeTo(1), CloseButton.ScaleTo(1), CloseButton.FadeTo(1)); entryTitle.Focus(); }