かずきのBlog@hatena

すきな言語は C# + XAML の組み合わせ。Azure Functions も好き。最近は Go 言語勉強中。日本マイクロソフトで働いていますが、ここに書いていることは個人的なメモなので会社の公式見解ではありません。

UWPのGridViewのItemsSourceに設定可能なコレクションの条件

てっきりINotifyCollectionChangedとIEnumerableあたり実装してればいいのかと思ってたら違ってました…。

https://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.gridview.aspx

C# or Visual Basic apps should implement INotifyCollectionChanged and System.Collections.IList (not IList<T>). Virtualization requires both of these interfaces.

ということでINotifyCollectionChangedとIListの実装が必要でした。 独自コレクション作る人は要注意。