Forum Xamarin.Forms

Is there a solution to disable inner scrolling of Listview within a Scrollview?

SerenaSerena Member ✭✭

Here is the layout I want to achieve:

I would like to scroll the entire screen instead of the listview.

I know bindable stacklayout is a good alternative as listview, but since I have to show group data, I didn't manage to make it work with bindable stacklayout.

What I tried but didn't work:
Try 1:
Put the listview and a boxview in the same grid. It did disable scrolling, but the listview won't be able to show full data in itemsource. It only shows the size of the screen.

Try 2 - custom renderer:

neither ios nor android is working....

I found this post mentioned:
listView.HeightRequest = listView.RowHeight * ((Your List that you want to show in ListView).Count + 1);

But seems like I can only get the count of item(it will be dynamic) in viewmodel, then how to set listview's height?

So I think the best solution is still to disable to scroll of listview. Is there a workaround?

Best Answer


  • jezhjezh Member, Xamarin Team Xamurai

    And there is an article about this, you can check it here:ListView Inside ScrollView Xamarin.Forms WorkAround

  • SerenaSerena Member ✭✭

    @jezh Thank you so much. There are trade-offs but save my life o:)

Sign In or Register to comment.