Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Is it possible to use IGrouping instead of ObservableCollection on Grouped ListView?

$
0
0

Currently I have an ObservableCollection as follows

public class MediaListSection : ObservableCollection<MediaViewModel>
{
    public string SectionName { get; private set; }

    public MediaListSection(string sectionName)
    {
        SectionName = sectionName;
    }
}

And I bind the Group Header to "SectionName"

Is it possible to use a IList<IGrouping<string, MediaViewModel>> instead of the ObservableCollection, and then have the Group Header bind to the Key?

I've got the listview bound as I would expect, but the header is blank when I bind to Key... I'm not sure what I would bind to here.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>