Skip to content

UIVirtualList Class

Definition

Namespace: Brine2D.UI

Virtualized scrolling list that renders only visible rows. Bind a data source via SetItems\(IReadOnlyList<T>\) and supply a row renderer via RowRenderer.

C#
public class UIVirtualList<T> : Brine2D.UI.UIVirtualListBase

Type parameters

T

Item type.

Inheritance System.ObjectUIVirtualListBase → UIVirtualList\<T>

Properties
Font Font used by the built-in fallback renderer when RowRenderer is null.
ItemCount Total number of items in the list.
RowRenderer Delegate that draws one row. Parameters: renderer, item, x, y, width, height, selected, hovered.
SelectedItem Returns the currently selected item, or default when no row is selected.
TextColor Text color used by the built-in fallback renderer when RowRenderer is null.
this[int] Returns the item at index.
Methods
SetItems\(IEnumerable<T>\) Replaces the data source and resets scroll and selection.
SetItems\(IReadOnlyList<T>\) Replaces the list data source and resets scroll position and selection.