public StudentMasterDetailsViewModel()
 {
     _studentCollection            = new StudentCollection();
     _studentMasterViewModel       = new StudentMasterViewModel();
     _deleteCommand                = new RelayCommand(DoDelete, CanDelete); // Changed
     _studentItemViewModelSelected = null;
 }
Ejemplo n.º 2
0
 public StudentMasterDetailsViewModel()
 {
     _studentCollection            = new StudentCollection();
     _studentMasterViewModel       = new StudentMasterViewModel();
     _deleteCommand                = null; // This needs to be changed
     _studentItemViewModelSelected = null;
 }
        public void Delete(string name)
        {
            // Delete from model collection
            _studentCollection.Delete(name);

            // Set selection to null
            StudentItemViewModelSelected = null;

            // Refresh the item list
            OnPropertyChanged(nameof(StudentItemViewModelCollection));
        }