C# 클래스 Alexandria.Common.RelayCommand

A command whose sole purpose is to relay its functionality to other objects by invoking delegates. The default return value for the CanExecute method is 'true'. RaiseCanExecuteChanged needs to be called whenever CanExecute is expected to return a different value.
상속: ICommand
파일 보기 프로젝트 열기: rit-sse/alexandria-WinRT

공개 메소드들

메소드 설명
CanExecute ( object parameter ) : bool

Determines whether this RelayCommand can execute in its current state.

Execute ( object parameter ) : void

Executes the RelayCommand on the current command target.

RaiseCanExecuteChanged ( ) : void

Method used to raise the CanExecuteChanged event to indicate that the return value of the CanExecute method has changed.

RelayCommand ( System.Action execute ) : System

Creates a new command that can always execute.

RelayCommand ( System.Action execute, Func canExecute ) : System

Creates a new command.

메소드 상세

CanExecute() 공개 메소드

Determines whether this RelayCommand can execute in its current state.
public CanExecute ( object parameter ) : bool
parameter object /// Data used by the command. If the command does not require data to be passed, this object can be set to null. ///
리턴 bool

Execute() 공개 메소드

Executes the RelayCommand on the current command target.
public Execute ( object parameter ) : void
parameter object /// Data used by the command. If the command does not require data to be passed, this object can be set to null. ///
리턴 void

RaiseCanExecuteChanged() 공개 메소드

Method used to raise the CanExecuteChanged event to indicate that the return value of the CanExecute method has changed.
public RaiseCanExecuteChanged ( ) : void
리턴 void

RelayCommand() 공개 메소드

Creates a new command that can always execute.
public RelayCommand ( System.Action execute ) : System
execute System.Action The execution logic.
리턴 System

RelayCommand() 공개 메소드

Creates a new command.
public RelayCommand ( System.Action execute, Func canExecute ) : System
execute System.Action The execution logic.
canExecute Func The execution status logic.
리턴 System