private void GestureListener_Tap(object sender, toolkit.GestureEventArgs e) { this.Cards.Add(AssociatedDeck.Deck.Cards[1]); AssociatedDeck.PopCard(); if (firstCardHolder.Children.Count == 0) { firstCardHolder.Children.Add(new CardControl { Card = this.Cards.Last() }); return; } if (secondCardHolder.Children.Count == 0) { secondCardHolder.Children.Add(new CardControl { Card = this.Cards.Last() }); return; } if (thirdCardHolder.Children.Count == 0) { thirdCardHolder.Children.Add(new CardControl { Card = this.Cards.Last() }); //turn off the holder control var gestureListener = toolkit.GestureService.GetGestureListener(this); gestureListener.Tap -= new EventHandler <toolkit.GestureEventArgs>(GestureListener_Tap); return; } }
private void GestureListener_Tap(object sender, toolkit.GestureEventArgs e) { this.Hand.Cards.Add(AssociatedDeck.Deck.Cards[1]); AssociatedDeck.PopCard(); AddCard(); }