Class ContentControlBindingHook
- Namespace
- ReactiveUI.Winforms
- Assembly
- ReactiveUI.Winforms.dll
AutoDataTemplateBindingHook is a binding hook that checks ItemsControls that don't have DataTemplates, and assigns a default DataTemplate that loads the View associated with each ViewModel.
public class ContentControlBindingHook : IPropertyBindingHook
- Inheritance
-
ContentControlBindingHook
- Implements
- Extension Methods
Constructors
ContentControlBindingHook()
public ContentControlBindingHook()
Methods
ExecuteHook(object?, object, Func<IObservedChange<object, object>[]>, Func<IObservedChange<object, object>[]>, BindingDirection)
Called when any binding is set up.
public 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.