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

SfListView calculate the correct height of item only at the first start or after scrolling.

Thread ID:





132752 Sep 19,2017 12:17 PM UTC Dec 13,2017 05:28 PM UTC Xamarin.Forms 4
Tags: SfListView
Asked On September 19, 2017 12:17 PM UTC

in our application there is a switch that makes additional lines visible in the list item. If you use the standard xamarin ListView the height is updated correctly. In the SFListView the height of the element is not recalculated.

Dinesh Babu Yadav [Syncfusion]
Replied On September 20, 2017 11:08 AM UTC

Hi Dmitry, 

Sorry for the inconvenience. 

We could able to reproduce the reported issue at our end and we have already logged a defect report for this. The fix for the issue will be available in our upcoming 2017 Volume 3 SP 2 release which is scheduled to be roll out by end of this month. We will let you know once the issue has been resolved and included in the release and we will appreciate your patience until then. 

Please let us know if you require further assistance. 

Dinesh Babu Yadav 

Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On October 10, 2017 11:34 AM UTC

Hi Dmitry, 
Sorry for the inconvenience. 
Due to Framework hurdles, the reported issue “When AutoFitMode is Height, ListView doesn’t calculate the height of item at runtime” could not be included in 2017 Volume 3 SP 2 release. Now it has been resolved and the fix will be included in our Volume 4 main release. The item size will be updated automatically in the Android and UWP platform.   
But need to manually force the SfListView to resize in iOS platform. Because, unable to find out child view’s size changes from parent view as per Xamarin iOS framework architecture. Hence we have introduced a new method ForceUpdateItemSize in SfListView to force the update the item size in iOS platform when its content size is affected. You need to call that method when making changes at runtime like below code snippet.  
if (Device.RuntimePlatform == Device.iOS)  
Please let us know if you require further assistance. 

G. Muthu Kumaran. 

Albu Sorin
Replied On December 12, 2017 07:30 AM UTC

When this ForceUpdateItemSize() must be called? I put in different places and still no effect. ItemTemplate must be defined in a special way?


Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On December 13, 2017 05:28 PM UTC

Hi Albu, 
You have to call for the ForceUpdateItemSize method in SfListView to force update the item size in iOS platform when its content size is affected. 
For your reference we have attached the sample and you can download it from the link below. 
In our sample, we have changed the font size and visibility of the item at runtime using Command in MVVM pattern and SfListView will automatically resize the items based on content. 
Please let us know if the provided sample meets your requirement. 
G.Muthu kumaran. 


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.

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