public override void UpdateCell(UITableViewCell cell, NSIndexPath indexPath)
{
base.UpdateCell(cell, indexPath);
if (PerformActionIfCellListElement(cell, indexPath, (listSource) => listSource.UpdateCell(cell, indexPath)))
return;
var memberData = GetMemberData(indexPath);
if (memberData.Value != null && cell.DetailTextLabel != null)
cell.DetailTextLabel.Text = memberData.Value.ToString();
foreach(var section in Sections.Values)
{
if (section.Views.ContainsKey(cell))
{
var views = section.Views[cell];
if (views.Count > 0)
{
foreach (var view in views)
{
var viewCaption = view as ICaption;
if (viewCaption != null && string.IsNullOrEmpty(viewCaption.Caption))
{
viewCaption.Caption = ViewParser.GetCaption(memberData.Member);
}
var dc = view as IDataContext<MemberData>;
if (dc != null)
{
if (dc.DataContext != memberData)
dc.DataContext = memberData;
}
var themeable = view as IThemeable;
if (themeable != null)
{
if (themeable.Theme != null)
{
themeable.Theme.Cell = cell;
}
themeable.InitializeTheme(cell);
}
}
}
}
}
}