void UpdateCommand() { if (_command != null) { _command.CanExecuteChanged -= CommandCanExecuteChanged; } _command = AddCommand.GetCommand(Element); if (_command != null && _syncCanExecute) { _command.CanExecuteChanged += CommandCanExecuteChanged; CommandCanExecuteChanged(_command, System.EventArgs.Empty); } }
void UpdateCommand() { _command = AddCommand.GetCommand(Element); }