Show / Hide Table of Contents

Class RelayCommand

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

Inheritance
System.Object
RelayCommand
Implements
System.Windows.Input.ICommand
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: MakCraft.ViewModels
Assembly: MakViewModelsBase.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
| Improve this Doc View Source

RelayCommand(Action<Object>)

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

Declaration
[Obsolete("RelayCommand(Action execute) または RelayCommand(Action<T> execute) を使用してください。")]
public RelayCommand(Action<object> execute)
Parameters
Type Name Description
System.Action<System.Object> execute
| Improve this Doc View Source

RelayCommand(Action<Object>, Predicate<Object>)

コマンドを作成。

Declaration
[Obsolete("RelayCommand(Action execute, Predicate<object> canExecute) または RelayCommand(Action<T> execute, Predicate<object> canExecute) を使用してください。")]
public RelayCommand(Action<object> execute, Predicate<object> canExecute)
Parameters
Type Name Description
System.Action<System.Object> 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
In This Article
  • Constructors
    • RelayCommand(Action)
    • RelayCommand(Action, Predicate<Object>)
    • RelayCommand(Action<Object>)
    • RelayCommand(Action<Object>, Predicate<Object>)
  • Methods
    • CanExecute(Object)
    • Execute(Object)
  • Events
    • CanExecuteChanged
  • Implements
Back to top Generated by DocFX