4 weeks ago
ccf364bRapid audio device connect/disconnect fires many CollectionChanged events in <100ms. Each one triggered UpdateLayout immediately, and the VirtualizingStackPanel's Verify() could run between two InsertItem calls, detecting an accumulated count mismatch and crashing with InvalidOperationException. Now InvalidateWindowSize coalesces via a 16ms DispatcherTimer (one frame at 60fps) so only the last invalidation in a burst actually triggers layout, when the collection is already stable.
Parent932f6a0