CommandBinding 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 CommandBinding 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| CommandBinding() |
初始化 CommandBinding 类的新实例。 |
| CommandBinding(ICommand) |
使用指定的CommandBinding值初始化类的新实例ICommand。 |
| CommandBinding(ICommand, ExecutedRoutedEventHandler) |
使用指定的CommandBinding和指定的ICommand事件处理程序初始化类的新实例Executed。 |
| CommandBinding(ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler) |
使用指定的和指定的CommandBindingICommand和Executed事件处理程序初始化类的新实例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
Executed新RoutedCommand事件处理程序。
适用于
CommandBinding(ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler)
使用指定的和指定的CommandBindingICommand和Executed事件处理程序初始化类的新实例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
Executed新RoutedCommand事件处理程序。
- canExecute
- CanExecuteRoutedEventHandler
CanExecute新RoutedCommand事件处理程序。