c# - Where to set BackgroundColor of Monotouch.Dialog Element? -


i extending styledmultilineelement class make combination of radioelement , styledmultilineelement. selection , combination of 2 working fine, getcell override seems not set background color of 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 appear on selected element telling me selected boolean indeed correct, background color appears white.

i assuming because trying in getcell method, i'm not sure else put it.

so question is, set backgroundcolor since isn't working here?

have tried setting backgroundcolor property of actual element itself?

there few properties:

  • uitableviewcellaccessory accessory
  • int lines
  • uilinebreakmode linebreakmode
  • uicolor textcolor
  • uifont subtitlefont
  • uifont font

these seem area setting style.

also, if value of selected changes, cell won't update right away. can refresh cell call when want refresh cell:

rootelement root = getimmediaterootelement (); root.reload (this, uitableviewrowanimation.fade); 

the getimmediaterootelement() method on actual element.

references: monotouch.dialog: update of text in element


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -