public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
			{
				var row = indexPath.Row;


				int n = (int) indexPath.IndexAtPosition(indexPath.Length - 1);
				_context.PresentationManager.ShowView (MainMenu.MenuOptions [n].View);
			}
		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{
			var cell = tableView.DequeueReusableCell (PriceTileTradeAffirmationViewCell.Key) as PriceTileTradeAffirmationViewCell;
			if (cell == null)
				cell = PriceTileTradeAffirmationViewCell.Create ();

			var doneTrade = _tradeTilesModel [(int)indexPath.IndexAtPosition (1)];

			cell.UpdateFrom (doneTrade);

			return cell;
		}
示例#3
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell(PriceTileTradeAffirmationViewCell.Key) as PriceTileTradeAffirmationViewCell;

            if (cell == null)
            {
                cell = PriceTileTradeAffirmationViewCell.Create();
            }

            var doneTrade = _tradeTilesModel [(int)indexPath.IndexAtPosition(1)];

            cell.UpdateFrom(doneTrade);

            return(cell);
        }
		public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
		{
			// For more information on why this is necessary, see the Apple docs
			var row = indexPath.Row;

			UITableViewCell cell = tableView.DequeueReusableCell(_cellID);

			int n = (int) indexPath.IndexAtPosition(indexPath.Length - 1);

			if (cell == null)
			{
				// See the styles demo for different UITableViewCellAccessory
				cell = new UITableViewCell(UITableViewCellStyle.Default, _cellID);
				cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;


			}

			string s = "";

			s = row + ":" + cell.Subviews.Count();


			if (row.Equals(5))
			{
				UILabel l = new UILabel(new RectangleF(10f, 10f, 200f, 20f));
				l.Text = backingList[n].Title;
				l.BackgroundColor = UIColor.Red;
				//UIView v = new UIView(new RectangleF(10f, 10f, 20f, 20f));
				//v.BackgroundColor = UIColor.Green;
				cell.Add(l);
			}

			if (row < 20)
			{

				cell.TextLabel.Text = backingList[n].Title;
			}

			//s = s + ":" + cell.Subviews.Count();
			//Console.WriteLine(s);

			return cell;
		}