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

ItemTapped of ListView stopped working after adding ImageButton, Is ImageButton stealing the focus?

$
0
0

I am having ImageButton inside ListView. Before adding ImageButton, i was able to select the ListView item, but after adding ImageButton, i am unable to select the row. OnItemClick of ListView is not get called. Below is my code:

<ListView x:Name="notesListView" RowHeight = "80" ItemTapped="OnItemClick">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <ViewCell.View>
                <StackLayout Orientation="Horizontal">

                                        <controls:ImageButton x:Name="starUnstarImageButton"
                                         Image="icon_star_white_48x48" HeightRequest="50" Orientation="ImageToLeft"  WidthRequest="50" 
                                         ImageHeightRequest="48" ImageWidthRequest="48" IsFocused = "False"/>

                                        <Label Text="{Binding ReminderText}"></Label>

                                    </StackLayout>
                    </ViewCell.View>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

Viewing all articles
Browse latest Browse all 58056

Trending Articles



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