Is there a way to get the Binding-Context itself in an enumerated template?
this.CollectionView.ItemTemplate = new DataTemplate(() =>
{
var view = new SubView();
view.SetBinding(SubView.SourceProperty, new Binding()
{
Source = ??? // <- here
});
return view;
};
Note:
Path = "." works fine on Android. but on iOS, the source is duplicated.
I have already checked that there are no duplicates in CollectionView.ItemsSource.
I'm new to the platform I hope I can help. I understand that you want to get the BindingContext of each element in the list. If I am interpreting correctly, then this is what you can do:
DataTemplate does not contain an accessible BindingContext, the BindingContext is passed to the element containing the DataTemplate.