public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(AllControlsViewCell.Key) as AllControlsViewCell; if (cell == null) { cell = new AllControlsViewCell(); } nuint row = (nuint)indexPath.Row; string sample = this.controller.SampleDictionaryArray.GetItem <NSString>(row); string[] tokens = sample.Split('/'); if (tokens.Length > 1) { sample = tokens[tokens.Length - 1]; } cell.TextLabel.Text = sample + ".cs"; cell.DetailTextLabel.Font = UIFont.FromName("Helvetica", 10f); cell.DetailTextLabel.TextColor = UIColor.White; cell.TextLabel.HighlightedTextColor = Utility.ThemeColor; UIView selectionColor = new UIView(); selectionColor.Frame = cell.Frame; selectionColor.BackgroundColor = UIColor.FromRGB(249, 249, 249); cell.SelectedBackgroundView = selectionColor; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(AllControlsViewCell.Key) as AllControlsViewCell; if (cell == null) { cell = new AllControlsViewCell(); } // Configure the cell... nuint row = (nuint)indexPath.Row; Control ctrl = controls.GetItem <Control> (row); cell.TextLabel.Text = ctrl.name; if (ctrl.image != null) { cell.ImageView.Image = ctrl.image; } if (ctrl.tag == "NEW") { cell.DetailTextLabel.Text = "NEW"; cell.DetailTextLabel.TextColor = UIColor.FromRGB(148, 75, 157); } else if (ctrl.tag == "UPDATED") { cell.DetailTextLabel.Text = "UPDATED"; cell.DetailTextLabel.TextColor = UIColor.FromRGB(108, 189, 68); } else if (ctrl.tag == "PREVIEW") { cell.DetailTextLabel.Text = "PREVIEW"; cell.DetailTextLabel.TextColor = UIColor.FromRGB(220, 141, 38); } cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; return(cell); }
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell (AllControlsViewCell.Key) as AllControlsViewCell; if (cell == null) cell = new AllControlsViewCell (); // Configure the cell... nuint row = (nuint)indexPath.Row; Control ctrl = controls.GetItem<Control> (row); cell.TextLabel.Text = ctrl.name; if (ctrl.image != null) { cell.ImageView.Image = ctrl.image; } if (ctrl.tag == "NEW") { cell.DetailTextLabel.Text = "NEW"; cell.DetailTextLabel.TextColor = UIColor.FromRGB (148, 75, 157); } else if (ctrl.tag == "UPDATED") { cell.DetailTextLabel.Text = "UPDATED"; cell.DetailTextLabel.TextColor = UIColor.FromRGB (108, 189, 68); } else if (ctrl.tag == "PREVIEW") { cell.DetailTextLabel.Text = "PREVIEW"; cell.DetailTextLabel.TextColor = UIColor.FromRGB (220, 141, 38); } cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; return cell; }