Click or drag to resize

IGuiFactoryServiceNewRelayCommand(ActionObject, PredicateObject) Method

Gets a command that executes an action and evaluates the canExecute condition every time when something in the Gui has changed.

Namespace: Altaxo.Main.Services
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
ICommand NewRelayCommand(
	Action<Object> execute,
	Predicate<Object>? canExecute = null
)

Parameters

execute  ActionObject
The execute action.
canExecute  PredicateObject  (Optional)
The canExecute function that evaluates if the execute action can be executed under the current conditions. May be null (in this case, it is considered to return true).

Return Value

ICommand
A command that can be used, e.g. for binding to the Gui.
See Also