A small sample app for the Recycled Cells with DrawnUI — Part II article.
Demonstrating SkiaCachedStack suitable for even/uneven cell heights, and SkiaStack + MeasureFirst strategy.
Live web demo — the same code compiled for the browser (variants A and B; the XAML variant C is MAUI-only). Web head lives in Blazor/, deployed by the Deploy web demo GitHub Actions workflow.
SCREENSHOTS SOON
All-in-one inside one app, one button switches between three lists, with a live overlay showing the list engine state:
- (A) a shop grid, two columns, loaded page by page from a mock server, loadmore indicator in footer
- (B) a 1000-row contact list, even small rows, ripples when tapped
- (C) a banner-card list in XAML, even large rows,
MeasureFirst
For a chat example — uneven rows, inverted scroll, data-side windowing — see DrawnChatList.
If the list built a cell for every one of its 1000 items, it could become slow and eat memory. So DrawnUI uses an internal sliding window: it only builds the cells near what's on screen, and throws the far-away ones away — rebuilding them if you scroll back. You get a long list at the memory cost of a few screenfuls of cells.
This happens automatically. Once a list grows past WindowSourceThreshold items — 300 by
default — the window switches on by itself, with no extra code. Under 300, DrawnUI just keeps every
cell (not worth windowing). This sample has 1000, so it's on.
If you need to change that:
ForceItemsWindow="True"— turn the window on from the very first item, ignoring the 300 count.WindowSourceThreshold = 0— turn the automatic behavior off entirely.