diff --git a/src/Controls/src/Core/Handlers/Items/iOS/ItemsViewLayout.cs b/src/Controls/src/Core/Handlers/Items/iOS/ItemsViewLayout.cs
index a5665d054e9d..537f69ce4358 100644
--- a/src/Controls/src/Core/Handlers/Items/iOS/ItemsViewLayout.cs
+++ b/src/Controls/src/Core/Handlers/Items/iOS/ItemsViewLayout.cs
@@ -108,13 +108,15 @@ internal virtual bool UpdateConstraints(CGSize size)
{
if (size.IsCloseTo(_currentSize))
{
+ // Need to update the constraints when dynamically adding items of different sizes
+ ConstrainTo(_currentSize);
return false;
}
ClearCellSizeCache();
EstimatedItemSize = CGSize.Empty;
-
+
_currentSize = size;
var newSize = new CGSize(Math.Floor(size.Width), Math.Floor(size.Height));
diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShouldCollectionViewEachItemsAppearWithoutDots.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShouldCollectionViewEachItemsAppearWithoutDots.png
new file mode 100644
index 000000000000..94b361780999
Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShouldCollectionViewEachItemsAppearWithoutDots.png differ
diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue26936.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue26936.xaml
new file mode 100644
index 000000000000..e14503cec9c9
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue26936.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue26936.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue26936.xaml.cs
new file mode 100644
index 000000000000..08a971351dcf
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue26936.xaml.cs
@@ -0,0 +1,30 @@
+using System.Collections.ObjectModel;
+
+namespace Maui.Controls.Sample.Issues;
+
+[Issue(IssueTracker.Github, 26936, "CollectionView items appear with ellipses or dots when dynamically adding more items.", PlatformAffected.macOS | PlatformAffected.iOS)]
+public partial class Issue26936 : ContentPage
+{
+ Issue26936ViewModel _viewModel = new Issue26936ViewModel();
+
+ public Issue26936()
+ {
+ InitializeComponent();
+ collectionView.ItemsSource = _viewModel.Items;
+ this.BindingContext = _viewModel;
+ }
+ private void Button_Clicked(object sender, EventArgs e)
+ {
+ _viewModel.Items.Add("item: " + this._viewModel.Items.Count);
+ }
+}
+
+public class Issue26936ViewModel
+{
+ public ObservableCollection Items { get; set; }
+ public Issue26936ViewModel()
+ {
+ Items = new ObservableCollection();
+ Items.Add("item: " + "0");
+ }
+}
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue26936.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue26936.cs
new file mode 100644
index 000000000000..41905b38cbbc
--- /dev/null
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue26936.cs
@@ -0,0 +1,23 @@
+using NUnit.Framework;
+using UITest.Appium;
+using UITest.Core;
+
+namespace Microsoft.Maui.TestCases.Tests.Issues;
+
+public class Issue26936(TestDevice testDevice) : _IssuesUITest(testDevice)
+{
+ public override string Issue => "CollectionView items appear with ellipses or dots when dynamically adding more items.";
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void ShouldCollectionViewEachItemsAppearWithoutDots()
+ {
+ App.WaitForElement("Label");
+ for (int i = 0; i < 50; i++)
+ {
+ App.Tap("Button");
+ }
+
+ VerifyScreenshot();
+ }
+}
diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShouldCollectionViewEachItemsAppearWithoutDots.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShouldCollectionViewEachItemsAppearWithoutDots.png
new file mode 100644
index 000000000000..9e173efa8699
Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ShouldCollectionViewEachItemsAppearWithoutDots.png differ