CommandBinding 建構函式

定義

初始化 CommandBinding 類別的新執行個體。Initializes a new instance of the CommandBinding class.

多載

CommandBinding()

初始化 CommandBinding 類別的新執行個體。Initializes a new instance of the CommandBinding class.

CommandBinding(ICommand)

使用指定的 CommandBinding 來初始化 ICommand 類別的新執行個體。Initializes a new instance of the CommandBinding class by using the specified ICommand.

CommandBinding(ICommand, ExecutedRoutedEventHandler)

使用指定的 CommandBinding 和指定的 ICommand 事件處理常式,初始化 Executed 類別的新執行個體。Initializes a new instance of the CommandBinding class by using the specified ICommand and the specified Executed event handler.

CommandBinding(ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler)

使用指定的 CommandBinding,和指定的 ICommandExecuted 事件處理常式,初始化 CanExecute 類別的新執行個體。Initializes a new instance of the CommandBinding class by using the specified ICommand and the specified Executed and CanExecute event handlers.

CommandBinding()

初始化 CommandBinding 類別的新執行個體。Initializes a new instance of the CommandBinding class.

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

另請參閱

CommandBinding(ICommand)

使用指定的 CommandBinding 來初始化 ICommand 類別的新執行個體。Initializes a new instance of the CommandBinding class by using the specified 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 以之為基礎的命令。The command to base the new RoutedCommand on.

CommandBinding(ICommand, ExecutedRoutedEventHandler)

使用指定的 CommandBinding 和指定的 ICommand 事件處理常式,初始化 Executed 類別的新執行個體。Initializes a new instance of the CommandBinding class by using the specified ICommand and the specified Executed event handler.

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 以之為基礎的命令。The command to base the new RoutedCommand on.

executed
ExecutedRoutedEventHandler

ExecutedRoutedCommand 事件的處理常式。The handler for the Executed event on the new RoutedCommand.

CommandBinding(ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler)

使用指定的 CommandBinding,和指定的 ICommandExecuted 事件處理常式,初始化 CanExecute 類別的新執行個體。Initializes a new instance of the CommandBinding class by using the specified ICommand and the specified Executed and CanExecute event handlers.

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 以之為基礎的命令。The command to base the new RoutedCommand on.

executed
ExecutedRoutedEventHandler

ExecutedRoutedCommand 事件的處理常式。The handler for the Executed event on the new RoutedCommand.

canExecute
CanExecuteRoutedEventHandler

CanExecuteRoutedCommand 事件的處理常式。The handler for the CanExecute event on the new RoutedCommand.

適用於