hi
i try to use commands in wpf for mvvm model,
this Is my Class , whats problem in my class?
public class DelegateCommand : ICommand { private readonly Action _command; private readonly Func<bool> _canExecute; public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySuggested -= value; } } public DelegateCommand(Action command, Func<bool> canExecute = null) { if (command == null) throw new ArgumentNullException(); _canExecute = canExecute; _command = command; } public void Execute(object parameter) { _command(); } public bool CanExecute(object parameter) { } } }
thanks regard