Class
RoutedCommand

Defines a command that implements ICommand and is routed through the element tree.

Definition

Namespace:Telerik.UI.Xaml.Controls

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
[TypeConverter(typeof(CommandConverter))]
public class RoutedCommand : ICommand

Inheritance: objectRoutedCommand

Derived Classes: RoutedUICommand

Implements: ICommand

Constructors

RoutedCommand()

Initializes a new instance of the RoutedCommand class.

Declaration

cs-api-definition
protected RoutedCommand()

RoutedCommand(string, Type)

Initializes a new instance of the RoutedCommand class.

Declaration

cs-api-definition
public RoutedCommand(string name, Type ownerType)

Parameters

name

string

The name.

ownerType

Type

Type of the owner.

RoutedCommand(string, Type, InputGestureCollection)

Initializes a new instance of the RoutedCommand class.

Declaration

cs-api-definition
public RoutedCommand(string name, Type ownerType, InputGestureCollection inputGestures)

Parameters

name

string

The name.

ownerType

Type

Type of the owner.

inputGestures

InputGestureCollection

The input gestures.

Properties

InputGestures

Gets the collection of InputGesture objects that are associated with this command.

Declaration

cs-api-definition
public InputGestureCollection InputGestures { get; }

Property Value

InputGestureCollection

The input gestures.

Name

Gets the name of the command.

Declaration

cs-api-definition
public string Name { get; set; }

Property Value

string

The name.

OwnerType

Gets the type that is registered with the command.

Declaration

cs-api-definition
public Type OwnerType { get; }

Property Value

Type

The type of the owner.

Methods

CanExecute(object, UIElement)

Determines whether this instance can execute the specified parameter.

Declaration

cs-api-definition
public bool CanExecute(object parameter, UIElement target)

Parameters

parameter

object

The parameter.

target

UIElement

The target.

Returns

bool

true if this instance can execute the specified parameter; otherwise, false.

Execute(object, UIElement)

Executes the RoutedCommand on the current command target.

Declaration

cs-api-definition
public void Execute(object parameter, UIElement target)

Parameters

parameter

object

The parameter.

target

UIElement

The target.

Events

CanExecuteChanged

Occurs when changes occur that affect whether the command should execute.

Declaration

cs-api-definition
public event EventHandler CanExecuteChanged

Event Value

EventHandler

Implements ICommand.CanExecuteChanged