RoutedCommand Constructors

Definition

Initializes a new instance of the RoutedCommand class.

Overloads

RoutedCommand()

Initializes a new instance of the RoutedCommand class.

RoutedCommand(String, Type)

Initializes a new instance of the RoutedCommand class with the specified name and owner type.

RoutedCommand(String, Type, InputGestureCollection)

Initializes a new instance of the RoutedCommand class with the specified name, owner type, and collection of gestures.

RoutedCommand()

Initializes a new instance of the RoutedCommand class.

C#
public RoutedCommand();

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

RoutedCommand(String, Type)

Initializes a new instance of the RoutedCommand class with the specified name and owner type.

C#
public RoutedCommand(string name, Type ownerType);

Parameters

name
String

Declared name for serialization.

ownerType
Type

The type which is registering the command.

Exceptions

name is null.

ownerType is null.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

RoutedCommand(String, Type, InputGestureCollection)

Initializes a new instance of the RoutedCommand class with the specified name, owner type, and collection of gestures.

C#
public RoutedCommand(string name, Type ownerType, System.Windows.Input.InputGestureCollection inputGestures);

Parameters

name
String

Declared name for serialization.

ownerType
Type

The type that is registering the command.

inputGestures
InputGestureCollection

Default input gestures associated with this command.

Exceptions

name is null.

the length of name is zero

-or-

ownerType is null.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10