Skip to content

ListBox.TryGetContainer method

Gets the container currently showing the item at index. False when that item is not realized, which is the normal state of one scrolled out of view.

public bool TryGetContainer(int index, out ItemContainer? container)

Containers are recycled: use the result at once rather than keeping it, since it may hold another item after the next layout.