Class DelegateCommand<T>
Delegate command to interact with the binding command.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Shared.Olap
Assembly: Syncfusion.OlapShared.WPF.dll
Syntax
public class DelegateCommand<T> : ICommand, ISuppressCommand
Type Parameters
Name |
---|
T |
Constructors
DelegateCommand(Action)
Initializes a new instance of the DelegateCommand<T> class.
Declaration
public DelegateCommand(Action executeMethod)
Parameters
Type | Name | Description |
---|---|---|
System.Action | executeMethod | The execute method. |
DelegateCommand(Action, Func<Boolean>)
Initializes a new instance of the DelegateCommand<T> class.
Declaration
public DelegateCommand(Action executeMethod, Func<bool> CanExecute)
Parameters
Type | Name | Description |
---|---|---|
System.Action | executeMethod | The execute method. |
System.Func<System.Boolean> | CanExecute | The can execute. |
Methods
CanExecute()
Determines whether this instance can execute.
Declaration
public bool CanExecute()
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
This one is a suppress implementation of CanExecute in ICommand.
CanExecute(Object)
Defines the method that determines whether the command can execute in its current state.
Declaration
public bool 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. |
Execute()
Executes this instance.
Declaration
public void Execute()
Remarks
This one is a suppress implementation of Execute in ICommand.
Execute(Object)
Defines the method to be called when the command is invoked.
Declaration
public void 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. |
Events
CanExecuteChanged
Occurs when changes occur that affect whether or not the command should execute.
Declaration
public event EventHandler CanExecuteChanged
Event Type
Type |
---|
System.EventHandler |