public ReviewPageViewModel(Game game) { this.game = game; QuestionViewModels = new List <QuizQuestionViewModel>(); for (int index = 0; index < game.NumberOfQuestions; index++) { var question = game.Questions[index]; var response = game.Responses[index]; var viewModel = new QuizQuestionViewModel(question, response); QuestionViewModels.Add(viewModel); } }
public ReviewPage(ReviewPageViewModel viewModel) { InitializeComponent(); this.BindingContext = viewModel; listQuestions.ItemTapped += async(sender, args) => { QuizQuestionViewModel qqvm = args.Item as QuizQuestionViewModel; if (qqvm != null) { await this.DisplayAlert("Explanation", qqvm.Explanation, "Ok"); } }; }