AppStore.Templates.QuizPage.populateQuestion C# (CSharp) Method

populateQuestion() public method

It populates the question with the index passed into the current view.
public populateQuestion ( int index ) : void
index int The index of the question which will be populated in the current view.
return void
        public void populateQuestion(int index)
        {
            QuestionNumber.Text="Question #" + (index+1) + " of " + iNumberofQuestions;
            Question.Text=quiz.getQueAnsList().ElementAt(index).getQuestion();
            for (int i = 0; i < 4; i++)
            {
                ((RadioButton)QuestionContent.Children.ElementAt(i+3)).Content=quiz.getQueAnsList().ElementAt(index).getAnswerOption().ElementAt(i);
            }
            iCurrentCorrectAnswer = quiz.getQueAnsList().ElementAt(index).getOptionNumber();
        }
    }