public void Constructor_AddsGestureRecognizers()
        {
            var gridView = new GridItemView();

            var recognizer = gridView.GestureRecognizers.Single(
                gesture => ((UITapGestureRecognizer)gesture).NumberOfTapsRequired == 1);

            Assert.NotNull(recognizer);
        }
        public void HandleSingleTap_WhenEventHasDelegates_RaisesDidTouchUpInsideEvent()
        {
            var gridView = new GridItemView();
            var touchedUpInside = false;
            gridView.DidTouchUpInside += (item, sender) => touchedUpInside = (item == gridView);

            gridView.HandleSingleTap(new UITapGestureRecognizer());

            Assert.True(touchedUpInside);
        }
        public void Constructor_AddsTitleLabelToSubviews()
        {
            var gridView = new GridItemView();

            Assert.True(gridView.Subviews.Contains(gridView.TitleLabel));
        }
 public UIView ViewForCell(FrozenHeadersGridView gridView, Point cell)
 {
     var view = new GridItemView();
     view.BackgroundColor = UIColor.White;
     var label = new UILabel(view.Bounds);
     label.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
     label.TextAlignment = UITextAlignment.Center;
     label.Text = String.Format("Cell {0}{1}", ColumnTitles [cell.X], cell.Y + 1);
     label.TextColor = UIColor.DarkTextColor;
     view.AddSubview(label);
     return view;
 }