Show / Hide Table of Contents

Class RoutedCommand

Implements command routed through visual tree of elements

Inheritance
System.Object
RoutedCommand
Implements
ICommand
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: EmptyKeys.UserInterface.Input
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class RoutedCommand : ICommand

Constructors

RoutedCommand()

Initializes a new instance of the RoutedCommand class.

Declaration
public RoutedCommand()

RoutedCommand(String, Type)

Initializes a new instance of the RoutedCommand class.

Declaration
public RoutedCommand(string name, Type ownerType)
Parameters
Type Name Description
System.String name

The name.

System.Type ownerType

Type of the owner.

RoutedCommand(String, Type, List<InputGesture>)

Initializes a new instance of the RoutedCommand class.

Declaration
public RoutedCommand(string name, Type ownerType, List<InputGesture> inputGestures)
Parameters
Type Name Description
System.String name

The name.

System.Type ownerType

Type of the owner.

System.Collections.Generic.List<InputGesture> inputGestures

The input gestures.

Properties

InputGestures

Gets the input gestures.

Declaration
public List<InputGesture> InputGestures { get; }
Property Value
Type Description
System.Collections.Generic.List<InputGesture>

The input gestures.

Name

Gets the name.

Declaration
public string Name { get; }
Property Value
Type Description
System.String

The name.

OwnerType

Gets the type of the owner.

Declaration
public Type OwnerType { get; }
Property Value
Type Description
System.Type

The type of the owner.

Methods

CanExecute(Object, UIElement)

Determines whether this instance can execute the specified parameter.

Declaration
public bool CanExecute(object parameter, UIElement target)
Parameters
Type Name Description
System.Object parameter

The parameter.

UIElement target

The target.

Returns
Type Description
System.Boolean
Exceptions
Type Condition
System.ArgumentNullException

Routed Command target

Execute(Object, UIElement)

Executes the command on specified target.

Declaration
public void Execute(object parameter, UIElement target)
Parameters
Type Name Description
System.Object parameter

The parameter.

UIElement target

The target.

Exceptions
Type Condition
System.ArgumentNullException

Routed Command target

Explicit Interface Implementations

ICommand.CanExecute(Object)

Defines the method that determines whether the command can execute in its current state.

Declaration
bool ICommand.CanExecute(object parameter)
Parameters
Type Name Description
System.Object parameter

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Returns
Type Description
System.Boolean

true if this command can be executed; otherwise, false.

ICommand.Execute(Object)

Defines the method to be called when the command is invoked.

Declaration
void ICommand.Execute(object parameter)
Parameters
Type Name Description
System.Object parameter

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Implements

ICommand
Back to top Generated by DocFX