Class
ComboBoxCommand

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

ComboBoxCommand()

Declaration

cs-api-definition
protected ComboBoxCommand()

Properties

ComboBox

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

Declaration

cs-api-definition
public RadComboBox ComboBox { get; }

Property Value

RadComboBox

Methods

CanExecute(object)

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.

Declaration

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

Parameters

parameter

object

The parameter passed to the command.

Returns

bool

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

Implements ICommand.CanExecute(object)

Execute(object)

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

Declaration

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

Parameters

parameter

object

The parameter passed to the command.

Implements ICommand.Execute(object)

RaiseCanExecuteChanged()

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.

Declaration

cs-api-definition
public void RaiseCanExecuteChanged()

Events

CanExecuteChanged

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.

Declaration

cs-api-definition
public event EventHandler CanExecuteChanged

Event Value

EventHandler

Implements ICommand.CanExecuteChanged