Show / Hide Table of Contents

Class RelayCommand

デリゲートを呼び出すことによって、コマンドを他のオブジェクトに中継する。CanExecute メソッドの既定値は 'true'。

Inheritance
System.Object
RelayCommand
Implements
System.Windows.Input.ICommand
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: MakCraft.ViewModels
Assembly: MakViewModelBaseCore.dll
Syntax
public class RelayCommand : ICommand

Constructors

| Improve this Doc View Source

RelayCommand(Action)

実行可否判定のないコマンドを作成。

Declaration
public RelayCommand(Action execute)
Parameters
Type Name Description
System.Action execute
| Improve this Doc View Source

RelayCommand(Action, Predicate<Object>)

コマンドを作成。

Declaration
public RelayCommand(Action execute, Predicate<object> canExecute)
Parameters
Type Name Description
System.Action execute
System.Predicate<System.Object> canExecute

Methods

| Improve this Doc View Source

CanExecute(Object)

現在の状態でこのコマンドを実行できるかどうかを判断します。

Declaration
public bool CanExecute(object parameter)
Parameters
Type Name Description
System.Object parameter
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Execute(Object)

コマンドの起動時に呼び出されるメソッドです。

Declaration
public void Execute(object parameter)
Parameters
Type Name Description
System.Object parameter

Events

| Improve this Doc View Source

CanExecuteChanged

コマンドを実行するかどうかに影響するような変更があった場合に発生するイベントです。

Declaration
public event EventHandler CanExecuteChanged
Event Type
Type Description
System.EventHandler

Implements

System.Windows.Input.ICommand
  • Improve this Doc
  • View Source
Back to top Generated by DocFX