Table of Contents

Interface ICommandSource

Namespace
Avalonia.Input
Assembly
Avalonia.Base.dll

An interface for classes that know how to invoke a Command.

public interface ICommandSource

Properties

Command

The command that will be executed when the class is "invoked." Classes that implement this interface should enable or disable based on the command's CanExecute return value. The property may be implemented as read-write if desired.

ICommand? Command { get; }

Property Value

ICommand

CommandParameter

The parameter that will be passed to the command when executing the command. The property may be implemented as read-write if desired.

object? CommandParameter { get; }

Property Value

object

IsEffectivelyEnabled

Gets a value indicating whether this control and all its parents are enabled.

bool IsEffectivelyEnabled { get; }

Property Value

bool

Methods

CanExecuteChanged(object, EventArgs)

Called for the CanExecuteChanged event when changes are detected.

void CanExecuteChanged(object sender, EventArgs e)

Parameters

sender object

The event sender.

e EventArgs

The event args.