Class DelegateCommand
Represents the command to be executed on SfPdfViewerControl.
Inheritance
System.Object
DelegateCommand
Implements
System.Windows.Input.ICommand
Namespace: Syncfusion.Windows.PdfViewer
Assembly: Syncfusion.SfPdfViewer.UWP.dll
Syntax
public class DelegateCommand : Object, ICommand
Constructors
DelegateCommand(Action<Object>, Func<Object, Boolean>)
Initializes a new instance of the DelegateCommand class.
Declaration
public DelegateCommand(Action<object> executeAction, Func<object, bool> canExecute)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Object> | executeAction | The execute action. |
System.Func<System.Object, System.Boolean> | canExecute | The can execute. |
Methods
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(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 the command should execute.
Declaration
public event EventHandler CanExecuteChanged
Event Type
Type | Description |
---|---|
System.EventHandler |
Implements
System.Windows.Input.ICommand