Hello,
I know that this is currently not implemented in Xamarin.Forms: https://xamarin.uservoice.com/forums/258559-xamarin-forms-suggestions/suggestions/6451625-support-for-relativesource-in-xaml-binding
But I tried the suggested workarounds stated here: https://forums.xamarin.com/discussion/comment/111746/#Comment_111746
and can't find them to work.
I have the following setup:
<ContentPage>
<ListView.ItemTemplate x:Name="MyList" ItemsSource="{Binding XyList}">
<DataTemplate>
<cells:MyCustomCell />
</DataTemplate>
</ListView.ItemTemplate>
</ContentPage>
MyCustomCell cell:
<ViewCell>
<Label Text="{Binding Path=SomeProperty, Source={util:RelativeContext MyList}" />
</ViewCell>
When debugging into the MarkupExtensions the "rootProvider.RootObject" has no parent/child elements and therefore FindByName returns null.
So I have no chance to access a property on my ViewModel when using a custom ViewCell?