CommandCreatePropertyChangedHandlerBinding(INotifyPropertyChanged, ActionString, 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.
Namespace: KGySoft.ComponentModelAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static ICommandBinding CreatePropertyChangedHandlerBinding(
this INotifyPropertyChanged source,
Action<string> handler,
params string[] propertyNames
)
<ExtensionAttribute>
Public Shared Function CreatePropertyChangedHandlerBinding (
source As INotifyPropertyChanged,
handler As Action(Of String),
ParamArray propertyNames As String()
) As ICommandBinding
public:
[ExtensionAttribute]
static ICommandBinding^ CreatePropertyChangedHandlerBinding(
INotifyPropertyChanged^ source,
Action<String^>^ handler,
... array<String^>^ propertyNames
)
[<ExtensionAttribute>]
static member CreatePropertyChangedHandlerBinding :
source : INotifyPropertyChanged *
handler : Action<string> *
propertyNames : string[] -> ICommandBinding
- source INotifyPropertyChanged
- The source object, whose PropertyChanged event is observed.
- handler ActionString
- The delegate to be invoked when the changed property is among the specified propertyNames. Its parameter is the name of the changed property.
- propertyNames String
- The property names, whose change invoke the specified handler.
ICommandBindingThe created
ICommandBinding instance.In Visual Basic and C#, you can call this method as an instance method on any object of type
INotifyPropertyChanged. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).