public void FormatCell(DemoModel demo)
        {
            containerView.Layer.CornerRadius = 2;
            labelView.Text = demo.Title;
            textView.AttributedText = demo.GetAttributedText ();

            CalculateAndSetFonts ();
        }
        public void FormatCell(DemoModel demo)
        {
            containerView.Layer.CornerRadius = 2;
            labelView.Text          = demo.Title;
            textView.AttributedText = demo.GetAttributedText();

            CalculateAndSetFonts();
        }
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            foreach (CollectionViewCell cell in CollectionView.VisibleCells)
            {
                var indexPath = CollectionView.IndexPathForCell(cell);
                cell.FormatCell(DemoModel.GetDemo(indexPath));
            }
        }
        public override void ItemSelected(UICollectionView collectionView, NSIndexPath indexPath)
        {
            DemoModel demo = DemoModel.GetDemo(indexPath);

            var newViewController = (TextViewController)Storyboard.InstantiateViewController(demo.ViewControllerIdentifier);

            newViewController.Title = demo.Title;
            newViewController.model = demo;
            NavigationController.PushViewController(newViewController, true);

            return;
        }
        public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
        {
            CollectionViewCell cell = (CollectionViewCell)CollectionView.DequeueReusableCell(key, indexPath);

            if (cell == null)
            {
                return(null);
            }

            cell.FormatCell(DemoModel.GetDemo(indexPath));
            return(cell);
        }