RoutedCommand 建構函式

定義

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

多載

RoutedCommand()

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

RoutedCommand(String, Type)

使用指定的名稱和擁有者類別,初始化 RoutedCommand 類別的新執行個體。Initializes a new instance of the RoutedCommand class with the specified name and owner type.

RoutedCommand(String, Type, InputGestureCollection)

使用指定的名稱、擁有者型別和筆勢集合,初始化 RoutedCommand 類別的新執行個體。Initializes a new instance of the RoutedCommand class with the specified name, owner type, and collection of gestures.

RoutedCommand()

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

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

另請參閱

RoutedCommand(String, Type)

使用指定的名稱和擁有者類別,初始化 RoutedCommand 類別的新執行個體。Initializes a new instance of the RoutedCommand class with the specified name and owner type.

public:
 RoutedCommand(System::String ^ name, Type ^ ownerType);
public RoutedCommand (string name, Type ownerType);
new System.Windows.Input.RoutedCommand : string * Type -> System.Windows.Input.RoutedCommand
Public Sub New (name As String, ownerType As Type)

參數

name
String

為序列化宣告的名稱。Declared name for serialization.

ownerType
Type

註冊命令的類型。The type which is registering the command.

例外狀況

namenullname is null.

ownerTypenullownerType is null.

另請參閱

RoutedCommand(String, Type, InputGestureCollection)

使用指定的名稱、擁有者型別和筆勢集合,初始化 RoutedCommand 類別的新執行個體。Initializes a new instance of the RoutedCommand class with the specified name, owner type, and collection of gestures.

public:
 RoutedCommand(System::String ^ name, Type ^ ownerType, System::Windows::Input::InputGestureCollection ^ inputGestures);
public RoutedCommand (string name, Type ownerType, System.Windows.Input.InputGestureCollection inputGestures);
new System.Windows.Input.RoutedCommand : string * Type * System.Windows.Input.InputGestureCollection -> System.Windows.Input.RoutedCommand
Public Sub New (name As String, ownerType As Type, inputGestures As InputGestureCollection)

參數

name
String

為序列化宣告的名稱。Declared name for serialization.

ownerType
Type

正要註冊命令的型別。The type that is registering the command.

inputGestures
InputGestureCollection

與這個命令關聯的預設輸入筆勢。Default input gestures associated with this command.

例外狀況

namenullname is null.

name 的長度為零the length of name is zero -或--or- ownerTypenullownerType is null.

另請參閱

適用於