CommandBinding 构造函数

定义

初始化 CommandBinding 类的新实例。

重载

名称 说明
CommandBinding()

初始化 CommandBinding 类的新实例。

CommandBinding(ICommand)

使用指定的CommandBinding值初始化类的新实例ICommand

CommandBinding(ICommand, ExecutedRoutedEventHandler)

使用指定的CommandBinding和指定的ICommand事件处理程序初始化类的新实例Executed

CommandBinding(ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler)

使用指定的和指定的CommandBindingICommandExecuted事件处理程序初始化类的新实例CanExecute

CommandBinding()

初始化 CommandBinding 类的新实例。

public:
 CommandBinding();
public CommandBinding();
Public Sub New ()

另请参阅

适用于

CommandBinding(ICommand)

使用指定的CommandBinding值初始化类的新实例ICommand

public:
 CommandBinding(System::Windows::Input::ICommand ^ command);
public CommandBinding(System.Windows.Input.ICommand command);
new System.Windows.Input.CommandBinding : System.Windows.Input.ICommand -> System.Windows.Input.CommandBinding
Public Sub New (command As ICommand)

参数

command
ICommand

要基于新 RoutedCommand 项的命令。

适用于

CommandBinding(ICommand, ExecutedRoutedEventHandler)

使用指定的CommandBinding和指定的ICommand事件处理程序初始化类的新实例Executed

public:
 CommandBinding(System::Windows::Input::ICommand ^ command, System::Windows::Input::ExecutedRoutedEventHandler ^ executed);
public CommandBinding(System.Windows.Input.ICommand command, System.Windows.Input.ExecutedRoutedEventHandler executed);
new System.Windows.Input.CommandBinding : System.Windows.Input.ICommand * System.Windows.Input.ExecutedRoutedEventHandler -> System.Windows.Input.CommandBinding
Public Sub New (command As ICommand, executed As ExecutedRoutedEventHandler)

参数

command
ICommand

要基于新 RoutedCommand 项的命令。

executed
ExecutedRoutedEventHandler

ExecutedRoutedCommand事件处理程序。

适用于

CommandBinding(ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler)

使用指定的和指定的CommandBindingICommandExecuted事件处理程序初始化类的新实例CanExecute

public:
 CommandBinding(System::Windows::Input::ICommand ^ command, System::Windows::Input::ExecutedRoutedEventHandler ^ executed, System::Windows::Input::CanExecuteRoutedEventHandler ^ canExecute);
public CommandBinding(System.Windows.Input.ICommand command, System.Windows.Input.ExecutedRoutedEventHandler executed, System.Windows.Input.CanExecuteRoutedEventHandler canExecute);
new System.Windows.Input.CommandBinding : System.Windows.Input.ICommand * System.Windows.Input.ExecutedRoutedEventHandler * System.Windows.Input.CanExecuteRoutedEventHandler -> System.Windows.Input.CommandBinding
Public Sub New (command As ICommand, executed As ExecutedRoutedEventHandler, canExecute As CanExecuteRoutedEventHandler)

参数

command
ICommand

要基于新 RoutedCommand 项的命令。

executed
ExecutedRoutedEventHandler

ExecutedRoutedCommand事件处理程序。

canExecute
CanExecuteRoutedEventHandler

CanExecuteRoutedCommand事件处理程序。

适用于