Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

BindableLayout get current element

$
0
0

Hi,
I have a StackLayout with BindableLayout.ItemsSource and BindableLayout.ItemTemplate.
I would like to add a GestureRecognizers with a Command and passing to it the Tapped element.

I have used this code but doesn't works:

<StackLayout                   
    BindableLayout.ItemsSource="{Binding ListaTecnici}"
    BindableLayout.ItemTemplate="{Binding RigaTemplate}">
    <StackLayout.GestureRecognizers>
        <TapGestureRecognizer Command="{Binding TestCommand}" CommandParameter="{Binding .}"  />
    </StackLayout.GestureRecognizers>
</StackLayout>

If i set as CommandParameter {Binding .}, then whole ViewModel is passed at the command function.

What I can set like CommandParameter to pass the tapped item?

Thank you :smile:


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>