private void GetAnswerCard(ObservableCollection<Card> randomCards) { var rnd = new Random(); int index = rnd.Next(0, totalquestion-1); if (answerCard == null) answerCard = randomCards[index]; else { randomCards.Remove(answerCard); var temp = randomCards.OrderBy(x => Guid.NewGuid()).ToArray(); answerCard = temp[0]; } aCard.Clear(); aCard.Add(answerCard.Clone()); aCard[0].DisplayImage = aCard[0].FrontImage; }
public Card Clone() { Card c = new Card(this.UniqueId,this._imagePath1, this._imagePath2, this.Group); return c; }