Example #1
0
		private void Initialize (dish dish)
		{
			SelectionStyle = UITableViewCellSelectionStyle.None;
			BackgroundColor = Resources.Colors.Cell;
			
			_lblHeadline = new UILabel (){
				Font = titleFont,
				TextColor = Resources.Colors.CellText,
				BackgroundColor = UIColor.Clear,
				AutoresizingMask = UIViewAutoresizing.FlexibleRightMargin | UIViewAutoresizing.FlexibleWidth,
			};
				
			_lblDescription = new UILabel (){
				Font = descrFont,
				TextColor = Resources.Colors.CellText,
				BackgroundColor = UIColor.Clear,
				Lines = 0,
				AutoresizingMask = UIViewAutoresizing.FlexibleRightMargin | UIViewAutoresizing.FlexibleWidth,
			};
				
			_lblPrice = new UILabel (){
				Font = priceFont,
				TextColor = Resources.Colors.CellText,
				BackgroundColor = UIColor.Clear,
				TextAlignment = UITextAlignment.Right,
				AutoresizingMask = UIViewAutoresizing.FlexibleRightMargin | UIViewAutoresizing.FlexibleWidth,
			};
			
			Update (dish);
			
			ContentView.Add (_lblHeadline);
			ContentView.Add (_lblDescription);
			ContentView.Add (_lblPrice);
			
		}
Example #2
0
		public void BindDataToCell (dish dishItem)
		{
			SpeisenTitel = dishItem.Headline;
			SpeisenPreis = string.Format ("{0} €", dishItem.Price);
			SpeisenText = dishItem.Description;
		}
Example #3
0
		public static float GetCellHeight (RectangleF bounds, dish dish)
		{
			return 95f;
		}
Example #4
0
		// 
		// This method is called when the cell is reused to reset
		// all of the cell values
		//
		public void Update (dish dish)
		{
			_dish = dish;
			
			_lblHeadline.Text = _dish.Headline;
			_lblDescription.Text = _dish.Description;
			_lblPrice.Text = string.Format ("{0} €", _dish.Price);
			
			SetNeedsDisplay ();
		}
Example #5
0
		public DishCell (UITableViewCellStyle style, NSString ident, dish dish) : base (style, ident)
		{
			this.Initialize (dish);
		}
Example #6
0
		public DishCell (dish dish) : this(UITableViewCellStyle.Default, new NSString("DishCell"), dish)
		{
			
		}
Example #7
0
		public DishCell (NSString ident, dish dish) : this(UITableViewCellStyle.Default, ident, dish)
		{
			
		}
Example #8
0
		public DishElement (dish dish) : base (null)
		{
			this._dish = dish;
		}