/// <summary> /// When play button is clicked, delegate the call to the question window, /// responsible for initalizing quiz. /// </summary> private async void PlayButton_Click(object sender, RoutedEventArgs e) { Window window = await QuestionWindow.CreateQuestionWindow(); this.Close(); window.Show(); }
public static async Task <QuestionWindow> CreateQuestionWindow() { QuestionWindow questionWindow = new QuestionWindow(); QuestionPage page = await QuestionPage.CreateQuestionPage(); questionWindow.QuestionFrame.Content = page; return(questionWindow); }