Recycled Cells with DrawnUI
CollectionView reuses views to keep memory in check, but pixel-perfect designs, mixed cell templates, and buttery-smooth scrolling can push against what a native control comfortably handles. Nick Kovalsky makes the case for a drawn alternative built on DrawnUI and SkiaSharp, where the same C# renders identically across .NET MAUI mobile and desktop, Blazor, and OpenTK.
What you’ll learn
- How recycled cells actually work — why large or unknown-size data sources need a limited window of rendered cells, and the re-measure/re-render cost that makes recycling tricky
- Choosing the right layout —
SkiaLayoutwithRecyclingTemplate="Enabled"insideSkiaScroll, and when to reach forSkiaCachedStackwith double buffering for many visible cells - Working with
ObservableCollection— whyObservableRangeCollectionandAddRange()matter, and the main-thread rules that differ betweenCollectionViewand DrawnUI - News Feed sample — progressive measurement with
MeasureVisible, appending pages viaLoadMorewithout resetting, and building oneSkiaDynamicDrawnCellthat handles every content type by togglingIsVisibleat zero cost - Chat List sample — a limited data window, two-directional load-more, inverted scrolling with
RotationandReverseGestures, scroll-to-element, and handling keyboard offset and focus
Both samples ship as runnable projects (they even run on the web), and Nick links the full tutorials and source. Read the post to see the trade-offs against native controls and grab the patterns for your own complex lists.