public static QuizModeQuestionItemViewModel CreateInstance(
     QuizModeQuestionItemView view,
     QuestionModel model)
 {
     var instance = new QuizModeQuestionItemViewModel();
     instance.QuizModeQuestionItemView = view;
     instance.QuestionModel = model;
     view.SetViewModel(instance);
     return instance;
 }
Exemple #2
0
 public void SetQuestionItems()
 {
     var itemLayer =
         MainWindow.QuizModePanel.quizModeMapAreaPanel1.QuestionItemLayer;
     itemLayer.Children.Clear();
     QItemList.Clear();
     foreach (var item in ProblemModel.QuestionList)
     {
         var view = new QuizModeQuestionItemView();
         var viewModel = QuizModeQuestionItemViewModel.CreateInstance(
             view, item);
         viewModel.Replace();
         itemLayer.Children.Add(view);
         QItemList.Add(viewModel);
     }
 }