Ooui.Forms ListViews now respect the values of SeparatorColor and SeparatorVisibility

This commit is contained in:
Troy Stanger 2018-11-07 12:31:11 -06:00
parent a75d44b573
commit eb2a8ec367
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,11 @@ namespace Ooui.Forms.Renderers
for (var i = listItems.Count; i < items.Count; i++) {
var li = new ListItem ();
li.Style["list-style-type"] = "none";
if (Element.SeparatorVisibility == SeparatorVisibility.Default)
{
var color = Element.SeparatorColor.ToOouiColor(Color.FromStyleValue("#999"));
li.Style["border-bottom"] = string.Format("{0}px {1} {2}", 1, "solid", color.ToString());
}
li.Click += ListItem_Click;
Control.AppendChild (li);
listItems.Add (li);