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 mod

    @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.