I am working the issue and will provide an update soon. Thank you for your patience.
ObservableCollection does not work for Microsoft Store version while working for debug version
Hong
1,566
Reputation points
The following code is solely for debugging.
Xaml:
<ListView x:Name="listViewTest"/>
C#:
var folders = new ObservableCollection<string>
{
"OBS 1",
"OBS 2",
"OBS 3"
};
listViewTest.ItemsSource = folders;
This works exactly as expected if the WinUI app is started from VS2026, but the store version built by VS2026 shows nothing.
The following works for both the debug version and the store version:
var folders = new c<string>
{
"OBS 1",
"OBS 2",
"OBS 3"
};
listViewTest.ItemsSource = folders.ToList();
My app has a slightly complex list, and it works flawlessly with the debug version, but not with the store version. It took me many hours to narrow it down to ObservableCollection.
Could anyone shed some light on this?
Windows development | WinUI
1 answer
Sort by: Oldest
-
Jay Pham (WICLOUD CORPORATION) 4,435 Reputation points Microsoft External Staff Moderator
2026-09-11T01:39:07.99+00:00