private void OnAnswer(Window window) { var next = _spellTestService.AnswerQuestion(CurrentAnswer); CurrentSpelling = next; CurrentAnswer = ""; if (next == null) { // All questions answered _speachService.Say("Test Completed", true); SaveAnswers(); OnQuit(window); return; } RequestSpelling(CurrentSpelling); }
private void OnAnswer(Window window) { var next = _spellTestService.AnswerQuestion(CurrentAnswer); CurrentSpelling = next; CurrentAnswer = ""; if (next == null) { // All questions answered _speachService.Say("Test Completed", true); OnQuit(window); return; // Appears that setting the property to null was not triggering an evaluation of CanExecuteChanged post command execution. // It was being called just before command invocation but the command is already triggered at that point so what's the point. //AnswerCommand.RaiseCanExecuteChanged(); //SkipCommand.RaiseCanExecuteChanged(); } RequestSpelling(CurrentSpelling); }