Interface IPropertyBindingHook
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Implement this as a way to intercept bindings at the time that they are created and execute an additional action (or to cancel the binding).
public interface IPropertyBindingHook
- Extension Methods
Methods
ExecuteHook(object?, object, Func<IObservedChange<object, object>[]>, Func<IObservedChange<object, object>[]>, BindingDirection)
Called when any binding is set up.
bool ExecuteHook(object? source, object target, Func<IObservedChange<object, object>[]> getCurrentViewModelProperties, Func<IObservedChange<object, object>[]> getCurrentViewProperties, BindingDirection direction)
Parameters
source
objectThe source ViewModel.
target
objectThe target View (not the actual control).
getCurrentViewModelProperties
Func<IObservedChange<object, object>[]>Get current view model properties.
getCurrentViewProperties
Func<IObservedChange<object, object>[]>Get current view properties.
direction
BindingDirectionThe Binding direction.
Returns
- bool
If false, the binding is cancelled.