private bool CanClose()
 {
     return(SelectedTask != null && TaskList.Contains(SelectedTask));
 }
 public void Close()
 {
     TaskList.Remove(SelectedTask);
 }