My object:
public class ListData
{
public string DisplayName { get; set; }
public ListInfo[] info { get; set; }
}
public class ListInfo
{
public string DisplayTag { get; set; }
}
My data:
var li = new ListInfo()
{
DisplayTag = "Tag"
};
var listView = new ListView();
listView.ItemsSource = new[]
{
new ListData { DisplayName = "One" },
new ListData { DisplayName = "Two", info = new[]{ li, li} }
};
I customize ListView and set binding:
displayNameLabel.SetBinding(Label.TextProperty, "DisplayName");
displayTagLabel.SetBinding(Label.TextProperty, new Binding("info[0].DisplayTag"));
But info[0].DisplayTag not work. And how display all array object ListInfo with Binding?