New to Telerik UI for .NET MAUIStart a free 30-day trial

Provides a base class for all commands that can be executed within a RadComboBox control. This abstract class defines the common API and provides access to the associated ComboBox instance.

Definition

Constructors

C#
protected ComboBoxCommand()

Properties

Gets the RadComboBox instance that this command is associated with. This property provides access to the ComboBox's properties and methods for command execution.

C#
public RadComboBox ComboBox { get; }

Methods

Determines whether the command can execute with the specified parameter in its current state. Override this method to implement custom logic for determining command availability.

C#
public abstract bool CanExecute(object parameter)
Parameters:parameterobject

The parameter passed to the command.

Returns:

bool

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

Implements: ICommand.CanExecute(object)

Executes the command with the specified parameter. Override this method to implement the command's behavior and logic.

C#
public abstract void Execute(object parameter)
Parameters:parameterobject

The parameter passed to the command.

Implements: ICommand.Execute(object)

Raises the CanExecuteChanged event to notify subscribers that the command's execution state may have changed. Call this method when conditions change that might affect whether the command can be executed.

C#
public void RaiseCanExecuteChanged()

Events

Occurs when the ability of the command to execute has changed. Subscribe to this event to update UI elements that depend on the command's execution state.

C#
public event EventHandler CanExecuteChanged

Implements: ICommand.CanExecuteChanged