This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 44525 - Xamarin.Forms Listview Row Height Does Not Adapt In iOS
Summary: Xamarin.Forms Listview Row Height Does Not Adapt In iOS
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.2.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-09-20 14:50 UTC by Hakan
Modified: 2017-04-20 09:37 UTC (History)
7 users (show)

See Also:
Tags: ac
Is this bug a regression?: ---
Last known good build:


Description Hakan 2016-09-20 14:50:47 UTC
I am using the code below as a custom cell in a listview. I am trying to use ForceUpdateSize() in order to update the cell of the listview whenever there is a change in the bound properties. The listview has the attribute HasUnevenRows="True". Still, when I change the name property to a long string at runtime (by using a button) in iOS, the row does not expand. But when string is long in the beginning of the application, the row has enough space to show the whole string. In Android, it seems to work fine even without the ForceUpdateSize() call. What should be done to update the height of the row to adapt to the changing content in iOS?

public class CustomCell : ViewCell
    public CustomCell()
        Label age = new Label();
        Label name = new Label();
        StackLayout cellWrapper = new StackLayout();

        age.SetBinding(Label.TextProperty, "Age");
        name.SetBinding(Label.TextProperty, "Name");

        age.PropertyChanged += UpdateCell;
        name.PropertyChanged += UpdateCell;


        View = cellWrapper;

    void UpdateCell(object sender, EventArgs e)

Comment 1 Samantha Houts 2016-09-28 16:48:55 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue, we would very much appreciate it.  
For your convenience, we have created some reproduction best practices viewable here:  

Warm regards, 
Xamarin Forms Team
Comment 2 Hakan 2016-09-29 21:29:21 UTC

You can reach the sample project following the link below:

When you start the application on iPhone and click "Change Name" button, you will see that the new name label for the first row will be changed and this long name will not fit in. As you scroll down and up again, you will see the row heigth increased in order to show the whole label. (I think this is due to row recycling)

Best regards.
Comment 3 Samantha Houts 2016-09-30 18:20:43 UTC
Aha! Yes, I see the issue when the ListView uses RecycleElement. That was the missing piece. Thank you!
Comment 4 Hakan 2016-09-30 20:12:59 UTC
You're welcome. Row height adjusts when the cell is recycled but not when the bound data changes. And ForceUpdateSize() and such does not seem to help.

It seems to be an important issue actually but I cannot change the "importance" field of the bug. Would you consider prioritizing it? 

By the way, I am not familiar with the bug fixing process of Xamarin. Does a bug like this usually get fixed in a month or so?

Comment 5 Hakan 2016-10-21 01:04:01 UTC
Any update on this one?
Comment 6 Rui Marinho 2017-03-14 10:37:56 UTC
Should be fixed in 2.3.5-pre1
Comment 7 thomas 2017-04-20 09:37:04 UTC
Sounds much like mine

Which still exists in 2.3.5-pre

Note You need to log in before you can comment on or make changes to this bug.