ICommandStateUpdaterTryUpdateState Method

Tries to apply the specified state on the command source. If returns , then the possible chained other updaters can try to update the state.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
bool TryUpdateState(
	Object commandSource,
	string stateName,
	Object? value
)

Parameters

commandSource  Object
The command source, whose state should be applied.
stateName  String
Name of the state. The default updater handles it as a property on the commandSource.
value  Object
The new value of the state to be applied.

Return Value

Boolean
if the state was applied successfully; if other possibly chained updaters or the default updater can try to apply the new state.

See Also