Class RoutedCommand
Defines a command that implements ICommand and is routed through the element tree.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll
Syntax
public class RoutedCommand : Object, ICommand
Constructors
RoutedCommand()
RoutedCommand(String, Type)
Initializes a new instance of the RoutedCommand class.
Declaration
public RoutedCommand(string name, Type ownerType)
Parameters
System.String
name
The name. |
System.Type
ownerType
Type of the owner. |
RoutedCommand(String, Type, InputGestureCollection)
Initializes a new instance of the RoutedCommand class.
Declaration
public RoutedCommand(string name, Type ownerType, InputGestureCollection inputGestures)
Parameters
System.String
name
The name. |
System.Type
ownerType
Type of the owner. |
InputGestureCollection
inputGestures
The input gestures. |
Properties
InputGestures
Gets the collection of InputGesture objects that are associated with this command.
Declaration
public InputGestureCollection InputGestures { get; }
Property Value
InputGestureCollection
The input gestures. |
Name
Gets the name of the command.
Declaration
public string Name { get; set; }
Property Value
System.String
The name. |
OwnerType
Gets the type that is registered with the command.
Declaration
public Type OwnerType { get; }
Property Value
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
System.Object
parameter
The parameter. |
System.Windows.UIElement
target
The target. |
Returns
System.Boolean
|
Execute(Object, UIElement)
Executes the RoutedCommand on the current command target.
Declaration
public void Execute(object parameter, UIElement target)
Parameters
System.Object
parameter
The parameter. |
System.Windows.UIElement
target
The target. |
Events
CanExecuteChanged
Occurs when changes occur that affect whether the command should execute.
Declaration
public event EventHandler CanExecuteChanged
Event Type
System.EventHandler
|