void UpdateTemplatedSupplementaryView(TemplatedCell cell, NSString elementKind, NSIndexPath indexPath)
        {
            ApplyTemplateAndDataContext(cell, elementKind, indexPath);

            if (cell is ItemsViewCell constrainedCell)
            {
                cell.ConstrainTo(ItemsViewLayout.ConstrainedDimension);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }