eQuantic.UIeQuantic.UI
Docs
Playground
GitHub
DocsLists & data
ListView
Ver código-fonte
1 min de leitura
A recycling list that only builds the rows you can see. Ten thousand rows cost what a screenful costs.
1
using eQuantic.UI.Components;
WINDOWING
Linha 1
Linha 2
Linha 3
Linha 4
Linha 5
Linha 6
Linha 7
Linha 8
Linha 9
Linha 10
Linha 11
Linha 12
Linha 13
Linha 14
Linha 15
Linha 16
the rest is two spacers
Usage
1
2
3
4
5
6
new ListView(count: 10_000, itemExtent: 44, itemBuilder: i => RowFor(i))
{
Width = SizeValue.Fill,
Height = SizeValue.Fill, // the list is a WINDOW — give it one
Overscan = 3,
}
API
Prop
Type
Default
Description
count
int
—
Logical row count (constructor).
itemExtent
float
—
Fixed row height (constructor). Variable extents are outside v1.
itemBuilder
Func<int, VisualNode>
—
Called only for rows in the window plus overscan.
Overscan
int
3
Rows built beyond each edge to absorb a fling.
Width
SizeValue
Auto
Usually Fill.
Height
SizeValue
Auto
Must be given — a window without a height is not a window.
States
State
Rendering
First frame
Builds against a viewport guess
Converged
The realized frame reports the true viewport; the next frame corrects
Scrolling
Pixels move without a rebuild until a row crosses the overscan margin
Accessibility
•
The scroll region reports the total count, so readers announce "row 40 of 10,000" rather than the window size.
When to use
•
Any collection past a few hundred rows.
Avoid
•
Nesting one inside an auto-height parent.
WARNINGScope (v1): vertical lists with a fixed ItemExtent.
NOTEEvery dimension resolves through Sizing.*(SizeVariant) and the token scales — never a literal. Source: src/eQuantic.UI.Components/ListView.cs.