AvaloniaObjectExtensionsAddClassHandlerTTarget, TValue(IObservableAvaloniaPropertyChangedEventArgsTValue, ActionTTarget, AvaloniaPropertyChangedEventArgsTValue) Method
Subscribes to a property changed notifications for changes that originate from a
TTarget.
Namespace: AvaloniaAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static IDisposable AddClassHandler<TTarget, TValue>(
this IObservable<AvaloniaPropertyChangedEventArgs<TValue>> observable,
Action<TTarget, AvaloniaPropertyChangedEventArgs<TValue>> action
)
where TTarget : AvaloniaObject
<ExtensionAttribute>
Public Shared Function AddClassHandler(Of TTarget As AvaloniaObject, TValue) (
observable As IObservable(Of AvaloniaPropertyChangedEventArgs(Of TValue)),
action As Action(Of TTarget, AvaloniaPropertyChangedEventArgs(Of TValue))
) As IDisposable
[<ExtensionAttribute>]
static member AddClassHandler :
observable : IObservable<AvaloniaPropertyChangedEventArgs<'TValue>> *
action : Action<'TTarget, AvaloniaPropertyChangedEventArgs<'TValue>> -> IDisposable when 'TTarget : AvaloniaObject
- observable IObservableAvaloniaPropertyChangedEventArgsTValue
- The property changed observable.
- action ActionTTarget, AvaloniaPropertyChangedEventArgsTValue
-
The method to call. The parameters are the sender and the event args.
- TTarget
- The type of the property change sender.
- TValue
- The type of the property.
IDisposableA disposable that can be used to terminate the subscription.In Visual Basic and C#, you can call this method as an instance method on any object of type
IObservableAvaloniaPropertyChangedEventArgsTValue. 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).