Class DelegateCommand
Represents a class for the delegate command
Inheritance
System.Object
DelegateCommand
Implements
System.Windows.Input.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: Syncfusion.Windows.Utils
Assembly: Syncfusion.SfShared.Wpf.dll
Syntax
[ClassReference(IsReviewed = false, ShouldInclude = false)]
public class DelegateCommand : ICommand
Constructors
DelegateCommand(Action<Object>)
Initializes a new instance of the Syncfusion.UI.Xaml.Utils.DelegateCommand class.
Declaration
public DelegateCommand(Action<object> executeAction)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Object> | executeAction | execute action |
See Also
Syncfusion.UI.Xaml.Utils.DelegateCommand
Syncfusion.UI.Xaml.Utils
DelegateCommand(Action<Object>, Predicate<Object>)
Initializes a new instance of the Syncfusion.UI.Xaml.Utils.DelegateCommand class.
Declaration
[ClassReference(IsReviewed = false)]
public DelegateCommand(Action<object> executeAction, Predicate<object> canExecute)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Object> | executeAction | execute action |
System.Predicate<System.Object> | canExecute | boolean value, indicates execute the command or not |
See Also
Syncfusion.UI.Xaml.Utils.DelegateCommand
Syncfusion.UI.Xaml.Utils
Methods
CanExecute(Object)
Returns a value if can execute
Declaration
public bool CanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The parameter to execute. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a value whether to execute or not |
Execute(Object)
Executes the parameter command
Declaration
public void Execute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | parameter to execute |
UpdateCanExecute()
Invokes event if can execute
Declaration
public void UpdateCanExecute()
Events
CanExecuteChanged
Occurs when value of CanExecute as changed
Declaration
public event EventHandler CanExecuteChanged
Event Type
Type |
---|
System.EventHandler |
Implements
System.Windows.Input.ICommand