We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set scroll position to max

Thread ID:





132391 Aug 30,2017 07:21 AM UTC Sep 4,2017 04:36 AM UTC Xamarin.Forms 3
Tags: SfListView
Almis Baimpourntidis
Asked On August 30, 2017 07:24 AM UTC


I tried this methods separately to scroll to bottom but they didn't work properly.

MyListView.LayoutManager as LinearLayout).ScrollToRowIndex(ViewModel.Messages.Count);

It works when I do

MyListView.LayoutManager as LinearLayout).ScrollToRowIndex(ViewModel.Messages.Count);
await Task.Delay(1000);
MyListView.LayoutManager as LinearLayout).ScrollToRowIndex(ViewModel.Messages.Count);

I believe the reason is because the list contains images and their sizes grows after loading from web.

I believe if I do something like MyListView.ScrollBar.Position = MyListView.ScrollBar.Max; it should work. Maybe you have any other suggestion?

Dinesh Babu Yadav [Syncfusion]
Replied On September 1, 2017 02:02 AM UTC

Hi Almis, 
Sorry for the inconvenience caused. 
We have checked the reported query “ListView does not scroll when scroll by ScrollToRowIndex” in the latest SfListView version(v15.3.0.26) and able to reproduce the issue at our end. We would like to let you know that while using AutoFitMode as “Height” or grouping scenarios in the application, you can overcome this issue by setting the ItemSize as largest item’s height.   
Example, if items height are range between 100 to 300, then you can set the ItemSize as greater than 300 (even you can set as 500).   
For your reference, we have attached the sample and you can download it from the below link.  
Why the issue occurs in SfListView? 
Because the scrollable height of the ScrollView (Which is loaded inside the ListView internally) will be calculated by item’s size(50) and total items count(100) i.e., 50 * 100 = 5000. So if we set the lesser item size, then scrollable height of the ScrollView will be less than its actual scrollable height and thus the ScrollView doesn’t scroll beyond that height. And even if we adjust the height at runtime and scroll to that extent programmatically from Portable project, it doesn’t scrolled as its corresponding native ScrollView doesn’t updated yet. This is the known limitation in Xamarin.Forms framework. However we are checking the possibilities of overcome this limitation by any workaround in our source level as promised earlier. Until then, you can overcome by setting the item size as suggested.  
Note: Currently we are analyzing the possibilities and working internally to include this workaround in our source level without doing any extra effort in sample. We will let you know once it has been achieved in source level. 
We are requesting you to use the above suggestion. Please let us know if you are facing any issue or practical difficulties in the above suggestion that will help us to provide more appropriate solution. 
Dinesh Babu Yadav 

Almis Baimpourntidis
Replied On September 1, 2017 07:43 AM UTC

Thank you for your help and explaining the issue, I will look at your sample and try the workaround.

Dinesh Babu Yadav [Syncfusion]
Replied On September 4, 2017 04:36 AM UTC

Hi Almis, 
Thanks for the update. We will wait to hear from you. 
Dinesh Babu Yadav 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon