Some simplified code:
MainPage.xaml:
<ContentPage x:Name="MyMainPage">
<ContentPage.Content>
<Grid>
<xForms:SfCarousel ItemsSource="{Binding SelectedBoard.ColumnsCollection}">
<xForms:SfCarousel.ItemTemplate>
<DataTemplate>
<controls:CarouselItem/>
</DataTemplate>
</xForms:SfCarousel.ItemTemplate>
</xForms:SfCarousel>
</Grid>
</ContentPage.Content>
</ContentPage>
CarouselItem.xaml:
<ContentView>
<ContentView.Content>
<Grid>
<xForms:SfListView ItemsSource="{Binding TaskCollection}">
<xForms:SfListView.ItemTemplate>
<DataTemplate>
<StackLayout>
<Button x:Name="MyButton" CommandParameter="{Binding .}" Command=""/>
</StackLayout>
</DataTemplate>
</xForms:SfListView.ItemTemplate>
</Grid>
</ContentView.Content>
</ContentView>
What I want to achieve: I want to, when I click "MyButton", fire Command defined in MainPageViewModel. I was trying to do that using
"Command="{Binding Path=BindingContext.MyCommand, Source={x:Reference Name=MyMainPage}}"
But then it throws "Can not find the object referenced by..." exception.