Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

ItemSelected and ItemTapped Event is not working

Why itemSelected is not working. plz plz plz plz any suggestion.

Tagged:

Answers

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭
    In what way is it not working?

    If you put a breakpoint in your event handler does it get hit?
  • MonalishaMonalisha Member ✭✭

    Thanks for your response.Now it resolved. I placed Scrollview inside listview, that'why ItemSelected Was not working properly. I placed scrollview outside of ListView, So Now it is working properly.

  • JohnHardmanJohnHardman GBUniversity admin

    @Monalisha said:
    Thanks for your response.Now it resolved. I placed Scrollview inside listview, that'why ItemSelected Was not working properly. I placed scrollview outside of ListView, So Now it is working properly.

    If you mean that you now have the ListView inside a ScrollView, that is something that you should not be doing.

    From https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/performance

    "Avoid placing a ListView inside a ScrollView for the following reasons:

    • The ListView implements its own scrolling.
    • The ListView will not receive any gestures, as they will be handled by the parent ScrollView.
    • The ListView can present a customized header and footer that scrolls with the elements of the list, potentially offering the functionality that the ScrollView was used for. For more information see Headers and Footers."
Sign In or Register to comment.