Merge pull request #79 from ericsink/master

For XF, add support for list item click.
This commit is contained in:
Frank A. Krueger 2018-02-12 16:35:41 -08:00 committed by GitHub
commit 386b364851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();