/// <summary> /// Raises the can execute event. /// </summary> /// <param name="parameter">The parameter.</param> /// <returns>returns <c>true</c> if the command can be executed, otherwise <c>false</c>.</returns> public virtual bool RaiseCanExecute(object parameter) { if (CanExecute != null) { var e = new CanExecuteEventArgs(this, parameter); CanExecute(this, e); return(e.CanExecute); } return(true); }
/// <summary> /// Raises the can execute event. /// </summary> /// <param name="parameter">The parameter.</param> /// <returns>returns <c>true</c> if the command can be executed, otherwise <c>false</c>.</returns> public virtual bool RaiseCanExecute(object parameter) { if (CanExecute != null) { var e = new CanExecuteEventArgs(this, parameter); CanExecute(this, e); return e.CanExecute; } return true; }