private async void SfCardView_Dismissed(System.Object sender, Syncfusion.XForms.Cards.DismissedEventArgs e) { await Task.Delay(400); SfCardView view = sender as SfCardView; (view.Content as Label).Text = "CardView " + i.ToString(); view.IsDismissed = false; i++; }
private void OnCardViewDismissed(object sender, Syncfusion.XForms.Cards.DismissedEventArgs e) { (cardView.Parent.BindingContext as CardViewModel).IsCardAlreadySwiped = true; var grid = cardView.Parent as Grid; int childIndex = grid.Children.IndexOf(cardView); var animation = new Animation(a => grid.RowDefinitions[childIndex].Height = a, cardView.Height, 0); animation.Commit(this, "CardViewAnimation", 16, 200, Easing.Linear, (a, c) => grid.RowDefinitions[childIndex].Height = cardView.Height, () => false); if (Device.RuntimePlatform == Device.UWP) { Task.Delay(250); cardView.Opacity = 0; } }
private void OnCardViewDismissed(object sender, Syncfusion.XForms.Cards.DismissedEventArgs e) { double viewHeight = cardView.Height; if (Device.RuntimePlatform == Device.UWP) { if (isAnimationCompleted) { return; } viewHeight = height - 1; } (cardView.Parent.BindingContext as CardViewModel).IsCardAlreadySwiped = true; grid = cardView.Parent as Grid; childIndex = grid.Children.IndexOf(cardView); var animation = new Animation(a => grid.RowDefinitions[childIndex].Height = a, viewHeight, 0); animation.Commit(this, "CardViewAnimation", 16, 200, Easing.Linear, (a, c) => Animate(), () => false); }