I'm using XF list view, and want to binding the whole object and then use converter to format the data based on some conditions, but object binding does not work anymore in XF. Test is on XF 2.5.0.91635, and android support library 26.1.0.1. First, when do not use item template, the list view is rendered correctly, though content is showing default object string:
<ListView x:Name="lv"></ListView>
But when using item template, nothing is show, though the number of items are indeed added in list view, and item selected event is fired correctly. Also, debug outputs following messages:
<ListView x:Name="lv">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label Text="{Binding}"></Label>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
[0:] Binding: Models.DataItem can not be converted to type 'System.String'
[0:] Binding: Models.DataItem can not be converted to type 'System.String'
[0:] Binding: Models.DataItem can not be converted to type 'System.String'
[0:] Binding: Models.DataItem can not be converted to type 'System.String'
[0:] Binding: Models.DataItem can not be converted to type 'System.String'
And when I add converter to binding expression, the convert function always receives null in its arguments.
add binding code:
List<DataItem> list = new List<DataItem>();
for(int i = 0; i < 10; i++)
{
list.Add(new DataItem
{
N = "L " + i.ToString(),
C = i + 1,
});
}
lv.ItemsSource = list;


<Label Text="{Binding}"></Label>? Normally you would define it like<Label Text="{Binding PropertyOnModel}"></Label>wherePropertyOnModelis a property on the data bound model, or at least<Label Text="{Binding .}"></Label>to bind to the entire model object. Does that resolve the issue?{Binding .}, or{Binding Path=.}.