AutoDataTemplateBindingHook class¶
Defined in
Namespace: ReactiveUI.Avalonia.Reactive
Assembly: ReactiveUI.Avalonia.Reactive.dll
Full name: ReactiveUI.Avalonia.Reactive.AutoDataTemplateBindingHook
Modifiers: public
Summary¶
Provides a binding hook that automatically assigns a default data template to an ItemsControl when no item template or data templates are defined.
Applies to
net10.0, net9.0, net8.0
Class hierarchy
classDiagram
class AutoDataTemplateBindingHook
class IPropertyBindingHook {
<>
}
IPropertyBindingHook <|.. AutoDataTemplateBindingHook
Implements: IPropertyBindingHook
Remarks¶
This class is typically used in scenarios where view models are bound to item controls and a data template is required for proper rendering. If the ItemsControl does not have an ItemTemplate or any DataTemplates, a default template is applied to ensure that items are displayed using a ViewModelViewHost. This behavior helps prevent issues where items may not be rendered due to missing templates.
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Methods¶
| Name | Summary |
|---|---|
| ExecuteHook | Called as a binding is set up, before it is wired, and can refuse the binding. |