コード例 #1
0
        public NoteMasterDetailsViewModel()
        {
            _model  = new NoteModel();
            _source = new NoteSource();

            _masterViewModel       = new NoteMasterViewModel();
            _itemViewModelSelected = null;
            _detailsViewModel      = null;

            _addCommand    = new RelayCommand(Add, CanAdd);
            _deleteCommand = new RelayCommand(Delete, CanDelete);
        }
コード例 #2
0
        public NoteMasterDetailsViewModel()
        {
            _model  = new NoteModel();
            _source = new NoteSource();

            _masterViewModel       = new NoteMasterViewModel();
            _itemViewModelSelected = null;
            _detailsViewModel      = null;

            _loadCommand   = new RelayCommand(Load, CanLoad); // Added
            _saveCommand   = new RelayCommand(Save, CanSave); // Added
            _addCommand    = new RelayCommand(Add, CanAdd);
            _deleteCommand = new RelayCommand(Delete, CanDelete);
        }