ListBox.

CreateItemContainerGenerator() Method

Summary

Creates the ItemContainerGenerator for the control.
Namespace
Avalonia.Controls
Containing Type
ListBox

Syntax

protected override IItemContainerGenerator CreateItemContainerGenerator()

Remarks

Certain controls such as TabControl don't actually create item containers; however they want it to be ItemsControls so that they have an Items property etc. In this case, a derived class can override this method to return null in order to disable the creation of item containers.

Return Value

Type Description
IItemContainerGenerator An IItemContainerGenerator or null.