For XF, add support for list item click. I'm new to the Ooui code, so I won't be surprised if this is not done quite right. Feedback welcome. Nonetheless, it seems to work.

This commit is contained in:
Eric Sink 2018-02-10 20:12:33 -06:00
parent e90fcc71aa
commit 089186c699
1 changed files with 8 additions and 0 deletions

View File

@ -82,6 +82,7 @@ namespace Ooui.Forms.Renderers
listItem.Style["list-style-type"] = "none";
listItem.AppendChild(cell);
listItem.Click += ListItem_Click;
_cells.Add(listItem);
}
@ -92,6 +93,13 @@ namespace Ooui.Forms.Renderers
}
}
private void ListItem_Click(object sender, TargetEventArgs e)
{
var it = (ListItem)sender;
var ndx = _cells.IndexOf(it);
Element.NotifyRowTapped(ndx, null);
}
private void UpdateBackgroundColor()
{
var backgroundColor = Element.BackgroundColor.ToOouiColor();