Class DelegateCommand
Represents a command that can perform a given action.
Implements
System.Windows.Input.ICommand
  Inherited Members
Namespace: Syncfusion.UI.Xaml.Core
Assembly: Syncfusion.Core.WinUI.dll
Syntax
public class DelegateCommand : DelegateCommand<object>, ICommandConstructors
DelegateCommand(Action<Object>)
Initializes a new instance of the DelegateCommand class.
Declaration
public DelegateCommand(Action<object> method)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<System.Object> | method | The method. | 
DelegateCommand(Action<Object>, Predicate<Object>)
Initializes a new instance of the DelegateCommand class.
Declaration
public DelegateCommand(Action<object> action, Predicate<object> canExecute)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<System.Object> | action | The action to execute when called. | 
| System.Predicate<System.Object> | canExecute | The function to call to determine if the command can execute the action. | 
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | Thrown if the execute action is null. | 
Implements
      System.Windows.Input.ICommand