C# Класс WinRTXamlToolkit.Debugging.Commands.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'. This class does not allow you to accept command parameters in the Execute and CanExecute callback methods.
Наследование: ICommand
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Execute ( object parameter ) : void

Defines the method to be called when the command is invoked.

RelayCommand ( System.Action execute ) : System

Initializes a new instance of the RelayCommand class that can always execute.

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

Initializes a new instance of the RelayCommand class.

Приватные методы

Метод Описание
CanExecute ( object parameter ) : bool
RaiseCanExecuteChanged ( ) : void

Описание методов

Execute() публичный Метод

Defines the method to be called when the command is invoked.
public Execute ( object parameter ) : void
parameter object This parameter will always be ignored.
Результат void

RelayCommand() публичный Метод

Initializes a new instance of the RelayCommand class that can always execute.
If the execute argument is null.
public RelayCommand ( System.Action execute ) : System
execute System.Action The execution logic.
Результат System

RelayCommand() публичный Метод

Initializes a new instance of the RelayCommand class.
If the execute argument is null.
public RelayCommand ( System.Action execute, Func canExecute ) : System
execute System.Action The execution logic.
canExecute Func The execution status logic.
Результат System