public ICommand ResetProgramCommand { get { if (_resetProgramCommand == null) { _resetProgramCommand = new RelayCommand(obj => {_event.ResetProgramEvent() , _event.UpdateProgramEvent()}, null); } return _resetProgramCommand; } }
如果是加入參數就變成以下這樣
string value = string.empty; string result = "Success"; public ICommand ResetProgramCommand { get { if (_resetProgramCommand == null) { _resetProgramCommand = new RelayCommand(obj => {_event.ResetProgramEvent(),value = result;}, null); } return _resetProgramCommand; } }
沒有留言:
張貼留言