ICommandSource Interface

Summary

An interface for classes that know how to invoke a Command.
graph BT Type["ICommandSource"] class Type type-node Implementing0["CheckBox"]-.->Type click Implementing0 "/api/Avalonia.Controls/CheckBox" Implementing1["RepeatButton"]-.->Type click Implementing1 "/api/Avalonia.Controls/RepeatButton" Implementing2["Button"]-.->Type click Implementing2 "/api/Avalonia.Controls/Button" Implementing3["CalendarButton"]-.->Type click Implementing3 "/api/Avalonia.Controls.Primitives/CalendarButton" Implementing4["ToggleSwitch"]-.->Type click Implementing4 "/api/Avalonia.Controls/ToggleSwitch" Implementing5["RadioButton"]-.->Type click Implementing5 "/api/Avalonia.Controls/RadioButton" Implementing6["CalendarDayButton"]-.->Type click Implementing6 "/api/Avalonia.Controls.Primitives/CalendarDayButton" Implementing7["ToggleButton"]-.->Type click Implementing7 "/api/Avalonia.Controls.Primitives/ToggleButton" Implementing8["MenuItem"]-.->Type click Implementing8 "/api/Avalonia.Controls/MenuItem"

Syntax

public interface ICommandSource

Properties

Name Value Summary
Command ICommand
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.
CommandParameter object
The parameter that will be passed to the command when executing the command. The property may be implemented as read-write if desired.
IsEffectivelyEnabled bool
Gets a value indicating whether this control and all its parents are enabled.

Methods

Name Value Summary
CanExecuteChanged(object, EventArgs) void
Bor the bheavior CanExecuteChanged