MonoTouch.Dialog.StyledStringElement.GetCell C# (CSharp) Method

GetCell() public method

public GetCell ( UITableView tv ) : UITableViewCell
tv UITableView
return UITableViewCell
		public override UITableViewCell GetCell (UITableView tv)
		{
			var cell = tv.DequeueReusableCell (skey);
			if (cell == null){
				cell = new UITableViewCell (Value == null ? UITableViewCellStyle.Default : UITableViewCellStyle.Value1, skey);
				cell.SelectionStyle = UITableViewCellSelectionStyle.Blue;
			}
			
			cell.Accessory = Accessory;
			cell.BackgroundColor = Appearance.BackgroundColorDisabled;
			cell.SelectionStyle = UITableViewCellSelectionStyle.None;
			
			var tl = cell.TextLabel;
			tl.Text = Caption;
			tl.TextAlignment = Alignment;
			tl.TextColor = TextColor == null ? UIColor.Black : TextColor;
			tl.BackgroundColor = UIColor.Clear;
			tl.Font = Font == null ? Appearance.LabelFont : Font;
			tl.LineBreakMode = LineBreakMode;
			tl.Lines = 0;			
			// The check is needed because the cell might have been recycled.
			if (cell.DetailTextLabel != null)
				cell.DetailTextLabel.Text = Value == null ? "" : Value;
			
			return cell;
		}		
	}