public void Handle_OnFinish(object sender, EventArgs e) { var parentAnimation = new Animation(); var fadeOutAnimation = new Animation(v => AnimationView.FadeTo(0, 250, Easing.CubicInOut)); var fadeInAnimation = new Animation(v => TextLabel.FadeTo(1, 250, Easing.CubicInOut)); parentAnimation.Add(0, 0.5, fadeOutAnimation); parentAnimation.Add(0.5, 1, fadeInAnimation); parentAnimation.Commit(this, "ChildAnimations", 16, 500, null); }
private async void Tgr2_Tapped(object sender, EventArgs e) { preferiticambiati = true; SnackDataDTO index = null; foreach (var item in (sender as StackLayout).Children) { if (item is Label) { var snackName = (item as Label).Text; index = result.data.snacks.Single(obj => obj.friendly_name == snackName); break; } } if (index != null) { string preferito = ""; foreach (var app in (sender as StackLayout).Children) { if (app is StackLayout) { foreach (var an in (app as StackLayout).Children) { if (an is Grid) { foreach (var ans in (an as Grid).Children) { if (ans is AnimationView) { AnimationView ap = (AnimationView)ans; if (ap.Animation == "star.json") { if (Check_FavouritesAndSet(index.id)) { ap.IsVisible = true; ap.FadeTo(1); ap.Play(); } } } if (ans is ImageButton) { ImageButton image = (ImageButton)ans; string a = ""; if (Check_Favourites(index.id)) { a = "fondomerende.image.star_fill.png"; } else { a = "fondomerende.image.star_empty.png"; } image.Source = ImageSource.FromResource(a); } } } } } } } }