Пример #1
0
 public TaskViewModel()
 {
     _task = new Task();
 }
Пример #2
0
 public TaskViewModel(Task model)
 {
     _task = model;
 }
Пример #3
0
 private void OnAddTaskCommand(string text)
 {
     var model = new Task() { IsDone = false, Text = text };
     model.Save(); // persist it
     var listItemViewModel = new TaskViewModel(model);
     Tasks.Add(listItemViewModel);
     PromptEntry = false;
 }