PropertyCommandStateUpdater Class

Provides an updater for the ICommandState entries, which treats state entries as properties on the command sources. When a state entry in the ICommandState changes, this updater tries to set the properties of the same name on the bound sources. For example, if a command represents a UI action bound to a menu item or a button (or both), then changing the Enabled property changes the Enabled property of the bound sources as well. You can adjust the text, shortcuts, associated image, checked state, etc. of the sources similarly.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0-rc.1
C#
public sealed class PropertyCommandStateUpdater : ICommandStateUpdater, 
	IDisposable
Inheritance
Object    PropertyCommandStateUpdater
Implements
ICommandStateUpdater, IDisposable

Remarks

A state updater can be added to a binding by the ICommandBinding.AddStateUpdater method.

If a state entry does not represent an existing property on a source, there will no error occur.

The updater considers both ICustomTypeDescriptor properties and reflection instance properties.

Properties

Updater Gets the PropertyCommandStateUpdater instance.

Extension Methods

Convert Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions)
ConvertTTarget Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions)
In Gets whether item is among the elements of set.
See the Examples section of the generic InT(T, T) overload for an example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)

See Also