Skip to content

Commit 9464ba9

Browse files
committed
Updated the README.md file.
1 parent 6e7146e commit 9464ba9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
# How to handle the tapped Xamarin.Forms listview tapped event when child view is clicked in Android platform?
22
This example demonstrates how to handle the interaction event for the child view in Android Renderer.
33

4+
## Sample
5+
6+
```xaml
7+
<sync:SfListView x:Name="listView" ItemSize="120" TapCommand="{Binding TapCommand}"
8+
ItemsSource="{Binding BookInfo}">
9+
<sync:SfListView.Behaviors>
10+
<local1:Behaviours/>
11+
</sync:SfListView.Behaviors>
12+
<sync:SfListView.ItemTemplate>
13+
<DataTemplate>
14+
<Grid Padding="10" BackgroundColor="Aqua">
15+
<Grid.GestureRecognizers>
16+
<TapGestureRecognizer Command="{Binding Path = BindingContext.GestureCommand, Source={x:Reference listView}}"/>
17+
</Grid.GestureRecognizers>
18+
<Grid.ColumnDefinitions>
19+
<ColumnDefinition Width="*" />
20+
<ColumnDefinition Width="100" />
21+
</Grid.ColumnDefinitions>
22+
<Grid.RowDefinitions>
23+
<RowDefinition Height="0.4*" />
24+
<RowDefinition Height="0.6*" />
25+
</Grid.RowDefinitions>
26+
<Label Text="{Binding BookName}" FontAttributes="Bold"/>
27+
<Button Text="Test" Command="{Binding BindingContext.ButtonCommand, Source={x:Reference listView}}" Grid.Row="1"/>
28+
<!--<Label Grid.Row="1" Text="{Binding BookDescription}" FontSize="15"/>-->
29+
<!--<numeric:SfNumericUpDown Grid.Column="1" Grid.RowSpan="2" HorizontalOptions="Start" VerticalOptions="Center"/>-->
30+
</Grid>
31+
</DataTemplate>
32+
</sync:SfListView.ItemTemplate>
33+
</sync:SfListView>
34+
```
35+
436
See [How to handle the tapped event when child view is clicked in Android platform](https://www.syncfusion.com/kb/9536/how-to-handle-the-tapped-event-when-child-view-is-clicked-in-android-platform) for more details.
537
## <a name="requirements-to-run-the-demo"></a>Requirements to run the demo ##
638

0 commit comments

Comments
 (0)