I am extending the StyledMultilineElement class to make a combination of RadioElement and StyledMultilineElement. The selection and combination of the two are working fine, however I my GetCell override seems to not properly set the background color of the cell.
public override UITableViewCell GetCell (UITableView tv)
{
var cell = base.GetCell (tv);
bool selected = RadioIdx == this.rgroup.Selected;
cell.Accessory = selected ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None;
cell.BackgroundColor = selected ? UIColor.Cyan : UIColor.White;
return cell;
}
The checkmark does appear on the selected element telling me that the selected boolean is indeed correct, however the background color always appears as white.
I am assuming this is just because I am trying to do it in the GetCell method, but I'm not sure where else to put it.
So the question is, where would I set the BackgroundColor since it obviously isn't working here?