Description
TableView becomes permanently unresponsive (no visual updates on Add/Delete/Import/Export, even though the underlying data source is correctly updated) once the bound ItemsSource (implementing ISupportIncrementalLoading) transitions to a count of zero. This happens whether the collection starts empty, or is emptied via deletion. Restarting the app is the only way to recover.
Steps to Reproduce
- Bind
TableView.ItemsSource to a custom collection implementing ISupportIncrementalLoading (see minimal repro below).
- Start with an empty collection (Count == 0) OR delete items one by one until Count reaches 0.
- Add a new item to the underlying source, then refresh (
Clear() + re-populate the same instance, or assign a fresh ItemsSource).
- Observe:
TableView UI does not update — no new rows appear, no visual refresh — even though the source collection itself is correctly populated (confirmed via debugger / exported file).
- Restart the application: previously "invisible" items now render correctly.
Expected behavior
TableView should keep responding to ItemsSource/CollectionChanged updates normally after the bound collection's count returns to zero and then increases again.
Actual behavior
TableView silently stops updating its visual rows the moment the source count hits zero, and never recovers within the same app session.
Minimal repro collection
public class MyIncrementalCollection : ObservableCollection<MyItem>, ISupportIncrementalLoading
{
private List<MyItem> _source;
private int _chunkSize;
private int _currentIndex;
public MyIncrementalCollection(List<MyItem> source, int chunkSize = 25)
{
_source = source;
_chunkSize = chunkSize;
}
public bool HasMoreItems => _currentIndex < _source.Count;
public void Reset(List<MyItem> source)
{
_source = source;
_currentIndex = 0;
Clear();
}
public IAsyncOperation<LoadMoreItemsResult> LoadMoreItemsAsync(uint count)
{
return AsyncInfo.Run(async cancellationToken =>
{
int itemsToFetch = Math.Min(_chunkSize, _source.Count - _currentIndex);
var nextChunk = _source.Skip(_currentIndex).Take(itemsToFetch).ToList();
await Task.Delay(50, cancellationToken);
foreach (var item in nextChunk) Add(item);
_currentIndex += itemsToFetch;
return new LoadMoreItemsResult { Count = (uint)itemsToFetch };
});
}
}
Environment
- WinUI.TableView version: 1.4.1
- Target framework: net10.0-windows10.0.19041.0
- TargetPlatformMinVersion: 10.0.19041.0
- Windows App SDK: 2.3.1
- OS: Windows 11 (26200.8973)
Description
TableViewbecomes permanently unresponsive (no visual updates on Add/Delete/Import/Export, even though the underlying data source is correctly updated) once the boundItemsSource(implementingISupportIncrementalLoading) transitions to a count of zero. This happens whether the collection starts empty, or is emptied via deletion. Restarting the app is the only way to recover.Steps to Reproduce
TableView.ItemsSourceto a custom collection implementingISupportIncrementalLoading(see minimal repro below).Clear()+ re-populate the same instance, or assign a freshItemsSource).TableViewUI does not update — no new rows appear, no visual refresh — even though the source collection itself is correctly populated (confirmed via debugger / exported file).Expected behavior
TableViewshould keep responding toItemsSource/CollectionChangedupdates normally after the bound collection's count returns to zero and then increases again.Actual behavior
TableViewsilently stops updating its visual rows the moment the source count hits zero, and never recovers within the same app session.Minimal repro collection
Environment