Going through the [https://github.com/jamesmontemagno/Xamarin.Forms-Monkeys](Monkey demo) on code-based ListView generation, trying to get a header cell to show up via code, the example creates a custom ViewCell:
public class HeaderCell : ViewCell {
public HeaderCell() {
// Build cell
}
}
If I take the contents of the HeaderCell ctor and place it in a DataTemplate initializer in the code behind:
list.GroupHeaderTemplate = new DataTemplate(() => {
return new ViewCell {
// contents of the HeaderCell ctor
};
});
Then no group headers show up at all. Any ideas?