[Bug] iOS: CollectionView items don't change their size when item content size is changed
See original GitHub issueDescription
CollectionView items don’t change their size when item content size is changed
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiApp.MainPage" BackgroundColor="White">
     <StackLayout>
        <Button Text="Button" Clicked="Button_Clicked"/>
        <CollectionView ItemsSource="{Binding Items}" >
                <CollectionView.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Label Text="{Binding Name}"/>
                        </Grid>
                    </DataTemplate>
                </CollectionView.ItemTemplate>
        </CollectionView>
    </StackLayout>
</ContentPage>
public partial class MainPage : ContentPage {
	public MainPage() {
		InitializeComponent();
                BindingContext = this;
	}
        ObservableCollection<SomeItem> _items;
        public ObservableCollection<SomeItem> Items {
            get {
                if (_items == null) {
                    _items = new ObservableCollection<SomeItem>(Enumerable.Range(0, 5).Select(c => {
                        return new SomeItem() { Name = string.Format("Item {0}", c) };
                    }));
                }
                return _items;
            }
        }
        void Button_Clicked(System.Object sender, System.EventArgs e) {
            foreach (SomeItem item in Items) {
                item.Name = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
            }
        }
public class SomeItem : INotifyPropertyChanged {
        string name;
        public string Name {
            get => name;
            set {
                name = value;
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Name)));
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
    }
}
Expected Behavior
All items change their height
Actual Behavior
All items don’t change their height
Steps to Reproduce
- Create a MAUI app
 - Put Button and CollectionView into StackLayout on the MainPage.xaml
 - Set ItemTemplate for CollectionView, put into ItemTemplate Grid with Label
 - In the Button.Clicked event handler change Label.Text
 - Deploy to iOS simulator and click the Button
 
Version with bug
Preview 10 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
 - Created 2 years ago
 - Reactions:3
 - Comments:5 (1 by maintainers)
 
Top Results From Across the Web
Cell size not updating after changing flow layout's itemSize
In my app, I have a full-screen paging collection view and each cell needs to be full-screen as well, so the collection view...
Read more >issue with collection view sizing | Apple Developer Forums
Looks like it is setting the cell size to layout.estimatedItemSize and not resizing to fit prior to drawing (these are autosized, with full...
Read more >CollectionView layout issues with nested ...
I've had this problem with CollectionView since the release of MAUI where items are not sized properly on first display.
Read more >Collection View Cells Self-Sizing: Step by Step Tutorial
In this article you will learn how collection view cells can dynamically adjust their size based on their content.
Read more >UICollectionViewCell Width and Height programmatically + ...
If you are trying to implement a CollectionView and while using autolayout, collectionview cells won't change the size.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hello, we are developing DevExpress .NET MAUI controls and experienced the same issue in our CollectionView. This issue has a High priority for us and we have/do not have a workaround. Thank you for your help.
I am facing this issue as well. ListView updates properly but CollectionView does not.