Databinding Collections in WPF: IList required

Posted on

If your data is in an IEnumerable (such as data returned by a yield function), IList< T >, or Dictionary< K,V >, your data will not appear in WPF data bindings. WPF collection data binding looks for the IList interface in the data collection which is not commonly implemented in newer IList< T > based collections.

List< T >, Collection< T >, and ObservableCollection< T > all implement IList, and work well with WPF data binding.

For more info, read:

Leave a Reply

Your email address will not be published.