void UpdateTemplatedSupplementaryView(TemplatedCell cell, NSString elementKind, NSIndexPath indexPath) { ApplyTemplateAndDataContext(cell, elementKind, indexPath); if (cell is ItemsViewCell constrainedCell) { cell.ConstrainTo(ItemsViewLayout.ConstrainedDimension); } }
void UpdateTemplatedSupplementaryView(TemplatedCell cell, NSString elementKind, NSIndexPath indexPath) { DataTemplate template = elementKind == UICollectionElementKindSectionKey.Header ? ItemsView.GroupHeaderTemplate : ItemsView.GroupFooterTemplate; var bindingContext = ItemsSource.Group(indexPath); cell.Bind(template, bindingContext, ItemsView); if (cell is ItemsViewCell) { cell.ConstrainTo(ItemsViewLayout.ConstrainedDimension); } }