Blazor Community Standup: Blazor virtualization gets flexible
TL;DR
Blazor virtualization in .NET 11 now handles variable-height items out of the box — Alona showed social-feed style lists where posts can be different sizes, expand in place, and still scroll smoothly without developers changing existing
Virtualizecomponent code.The big under-the-hood change is a running average for item height — instead of treating
ItemSizeas a fixed truth like in .NET 10, .NET 11 uses it as an initial estimate, then recalculates spacer sizes from measured items to reduce scrollbar jumps.Microsoft quietly raised overscan from 3 to 15 items on each side — Daniel Roth and Alona explained that the jump from 6 total extra items to 30 total gives the running average enough samples early on, especially with small viewports and larger items.
Anchor modes are the next major feature, aimed at social feeds, chats, and log viewers — the new modes let developers pin behavior to the beginning or end of a list so prepended or appended items don’t yank users around while they’re reading midstream.
A new comparer API matters if your list items aren’t stable object references — anchor-mode prepend/append detection compares one tracked item, so if apps recreate objects instead of reusing references, developers should provide a custom equality comparer.
More is coming: QuickGrid integration, Aspire dashboard scenarios, and scroll-to-index — variable-height virtualization is already in .NET 11 Preview 3, anchor modes are targeted for Preview 4 or 5, and Alona says scroll-to-index is planned for .NET 11 if it lands in time.
The Breakdown
Why virtualization suddenly matters more in .NET 11
Daniel Roth opens by framing virtualization as the fix for huge lists — tens of thousands or even hundreds of thousands of rows — where you want a viewport over data without rendering everything at once. Alona quickly gets specific: Blazor has had virtualization for a while, but until now it only really worked when every item had the same height.
The real trick: spacers, overscan, and faking a full scroll
Alona explains the three moving parts: the viewport, overscan items above and below it, and spacers that make the scrollbar feel like the full list exists even when most items aren’t loaded. That leads to the core .NET 11 change: ItemSize is no longer a rigid size requirement, but an initial estimate used only for first render before Blazor starts measuring actual item heights.
The running-average hack that makes variable heights feel smooth
After the first render, Blazor measures the distance between spacers and the number of loaded items, then computes a running average for item height. That average is used to size placeholders more accurately, which cuts down on the “scroll jumps” users used to get when placeholders and real content didn’t match. To make that estimate less noisy, overscan increased from 3 items above and below in .NET 10 to 15 above and 15 below in .NET 11.
The demo: social-feed posts that expand without making you seasick
Alona demos a Twitter-like feed with posts of uneven height, including items that expand and collapse in place. The memorable moment is Daniel’s reaction: expanding a post doesn’t shove the content around — “we didn’t get travel sickness from reading it.” She also notes that new posts arriving at the top can still cause small movement, which sets up the next feature.
Jump-to-top and jump-to-bottom finally behave with variable heights
One subtle problem with variable-height virtualization is keyboard jumping with Home and End. In older behavior, slow loading could land users at the bottom briefly and then bounce them back when real items replaced placeholders; Alona says in some .NET 10 cases she had to press jump several times. In .NET 11 Preview 3, those jumps now work cleanly even when item heights vary.
Anchor modes: the feature for feeds, chats, and log viewers
This is the upcoming feature Alona is most animated about: different apps want different scroll behavior when new items appear. A social feed wants to stay pinned to the top, while a chat or log viewer wants to auto-follow the end; anchor modes add beginning, end, and none style control so mid-list readers don’t get jerked around by inserts. Daniel calls out that part of .NET 10’s behavior — jumping users while they’re reading in the middle — is basically being treated as a bug, not sacred backward compatibility.
The gnarly implementation detail: one watched item and a new comparer API
To preserve viewport position, JavaScript snapshots which item is at the top of the visible area, tracks where it moves in the DOM, and auto-scrolls before render finishes so users don’t see a flash. Prepend vs. append detection relies on comparing one tracked item, not scanning the whole list, which is why Alona says apps that recreate objects should supply a custom comparer; stable references work fine without it.
Horizontal scroll bugs, QuickGrid work, and what’s next
Alona also shows a log-viewer scenario where vertical scrolling happens on the page but horizontal scrolling happens inside the container — a DOM/intersection-observer bug from .NET 10 is now fixed. In the Q&A, Daniel points people to QuickGrid for an in-box Blazor data grid and says the team is now making sure all these virtualization improvements flow through QuickGrid and the Aspire dashboard. Variable-height support is already in Preview 3, anchor modes are targeted for Preview 4 or 5, and Alona says scroll-to-index — getting a specific item ID to the top of the viewport — is now on her .NET 11 plan.