C# Class SoundBoard.DelegateCommand

This class allows delegating the commanding logic to methods passed as parameters, and enables a View to bind commands to objects that are not part of the element tree.
Inheritance: ICommand
Exibir arquivo Open project: jormenjanssen/Soundboard

Public Methods

Method Description
CanExecute ( ) : bool

Method to determine if the command can be executed

DelegateCommand ( System.Action executeMethod ) : System

Constructor

DelegateCommand ( System.Action executeMethod, Func canExecuteMethod ) : System

Constructor

DelegateCommand ( System.Action executeMethod, Func canExecuteMethod, bool isAutomaticRequeryDisabled ) : System

Constructor

Execute ( ) : void

Execution of the command

RaiseCanExecuteChanged ( ) : void

Raises the CanExecuteChaged event

Protected Methods

Method Description
OnCanExecuteChanged ( ) : void

Protected virtual method to raise CanExecuteChanged event

Private Methods

Method Description
ICommand ( object parameter ) : bool
ICommand ( object parameter ) : void

Method Details

CanExecute() public method

Method to determine if the command can be executed
public CanExecute ( ) : bool
return bool

DelegateCommand() public method

Constructor
public DelegateCommand ( System.Action executeMethod ) : System
executeMethod System.Action
return System

DelegateCommand() public method

Constructor
public DelegateCommand ( System.Action executeMethod, Func canExecuteMethod ) : System
executeMethod System.Action
canExecuteMethod Func
return System

DelegateCommand() public method

Constructor
public DelegateCommand ( System.Action executeMethod, Func canExecuteMethod, bool isAutomaticRequeryDisabled ) : System
executeMethod System.Action
canExecuteMethod Func
isAutomaticRequeryDisabled bool
return System

Execute() public method

Execution of the command
public Execute ( ) : void
return void

OnCanExecuteChanged() protected method

Protected virtual method to raise CanExecuteChanged event
protected OnCanExecuteChanged ( ) : void
return void

RaiseCanExecuteChanged() public method

Raises the CanExecuteChaged event
public RaiseCanExecuteChanged ( ) : void
return void