CommandBindingsCollectionAddPropertyChangedHandlerBinding(INotifyPropertyChanged, Action, String) Method

Creates a special command binding for the PropertyChanged event of the specified source that invokes the specified handler only when the changed property is among the specified propertyNames.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public ICommandBinding AddPropertyChangedHandlerBinding(
	INotifyPropertyChanged source,
	Action handler,
	params string[] propertyNames
)

Parameters

source  INotifyPropertyChanged
The source object, whose PropertyChanged event is observed.
handler  Action
The delegate to be invoked when the changed property is among the specified propertyNames.
propertyNames  String
The property names, whose change invoke the specified handler.

Return Value

ICommandBinding
The created ICommandBinding instance that has been added to this CommandBindingsCollection.

Exceptions

ArgumentNullExceptionsource or propertyNames is .
ArgumentExceptionpropertyNames is empty.

See Also