protected void MatchCard(Rectangle rectangle) { CardViewmodel card = rectangle.DataContext as CardViewmodel; card.Match(); }