public QuestionVM(INavigationService navigationservice) { //Bind up the navigation service and commands _navigationService = navigationservice; this.NextQuestionTest = new Command(nextQuestion, () => { return(CurrentQuestion < CurrentQuestionList.Count() - 1); }); this.SubmitTest = new Command(SaveAsync, () => { return(true); }); //When the page loads, always increment the question number, and then show the user the question //which will be in the CurrentQuestion object. this.QuestionNumber = (CurrentQuestion + 1).ToString(); this.QuestionText = CurrentQuestionList[CurrentQuestion].QuestionText; }
public PracticeQuestionVM(INavigationService navigationservice) { //When the page is created blank out the feedBack section this.feedBack = ""; //Bind up the nagaivationservice and commands for the buttons _navigationService = navigationservice; this.EndPractice = new Command(endPractice, () => { return(CurrentQuestion < CurrentQuestionList.Count() - 1); }); this.NextQuestionPractice = new Command(nextQuestion, () => { return(CurrentQuestion < CurrentQuestionList.Count() - 1); }); this.ShowAnswer = new Command(showAnswer, () => { return(true); }); //When the page loads, always increment the question number, and then show the user the question //which will be in the CurrentQuestion object. this.QuestionNumber = (CurrentQuestion + 1).ToString(); this.QuestionText = CurrentQuestionList[CurrentQuestion].QuestionText; }