Class
ControlCommandBase<T>

Provides a base implementation for control-specific commands.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Type Parameters:

T

The type of control this command is associated with.

Syntax:

cs-api-definition
public abstract class ControlCommandBase<T> : AttachableObject<T>, ICommand where T : class

Inheritance: objectAttachableObject<T>ControlCommandBase<T>

Derived Classes: ListViewCommandDataGridCommandSideDrawerCommandBase

Implements: ICommand

Inherited Members AttachableObject<T>.OnDetached(T)AttachableObject<T>.OnAttached()AttachableObject<T>.Owner

Constructors

ControlCommandBase()

Declaration

cs-api-definition
protected ControlCommandBase()

Methods

CanExecute(object)

Defines the method that determines whether the command can execute in its current state.

Declaration

cs-api-definition
public virtual bool CanExecute(object parameter)

Parameters

parameter

object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Returns

bool

true if this command can be executed; otherwise, false.

Implements ICommand.CanExecute(object)

Execute(object)

Defines the method to be called when the command is invoked.

Declaration

cs-api-definition
public virtual void Execute(object parameter)

Parameters

parameter

object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Implements ICommand.Execute(object)

OnCanExecuteChanged(EventArgs)

Raises the CanExecuteChanged event.

Declaration

cs-api-definition
protected virtual void OnCanExecuteChanged(EventArgs e)

Parameters

e

EventArgs

The event arguments.

Events

CanExecuteChanged

Occurs when changes occur that affect whether or not the command should execute.

Declaration

cs-api-definition
public event EventHandler CanExecuteChanged

Event Value

EventHandler

Implements ICommand.CanExecuteChanged