void ConstrainToItemsView() { var itemsViewWidth = ItemsView.Width; var itemsViewHeight = ItemsView.Height; if (itemsViewHeight < 0 || itemsViewWidth < 0) { ItemsViewLayout.UpdateConstraints(CollectionView.Bounds.Size); return; } ItemsViewLayout.UpdateConstraints(new CGSize(itemsViewWidth, itemsViewHeight)); }