/// <param name="parameter">THe command parameter to be passed</param>
/// <returns>Returns true if the command can execute. By default true is returned so that if the user of SimpleCommand does not specify a CanExecuteCommand delegate the command still executes.</returns>
publicboolCanExecute(objectparameter)
{
if(CanExecuteDelegate!=null)
returnCanExecuteDelegate(parameter);
returntrue;// if there is no can execute default to true
}
publiceventEventHandlerCanExecuteChanged
{
add{CommandManager.RequerySuggested+=value;}
remove{CommandManager.RequerySuggested-=value;}
}
/// <summary>
/// Executes the actual command
/// </summary>
/// <param name="parameter">THe command parameter to be passed</param>