From 97122685016264ab550329ac887503cfb5dae6ee Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Mon, 23 Jun 2025 13:01:17 +0530 Subject: [PATCH 1/8] fix added --- src/Core/src/Platform/Windows/DatePickerExtensions.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Core/src/Platform/Windows/DatePickerExtensions.cs b/src/Core/src/Platform/Windows/DatePickerExtensions.cs index 839fc8d9a4af..3800866cfb6e 100644 --- a/src/Core/src/Platform/Windows/DatePickerExtensions.cs +++ b/src/Core/src/Platform/Windows/DatePickerExtensions.cs @@ -55,7 +55,15 @@ public static void UpdateMaximumDate(this CalendarDatePicker platformDatePicker, public static void UpdateCharacterSpacing(this CalendarDatePicker platformDatePicker, IDatePicker datePicker) { - platformDatePicker.CharacterSpacing = datePicker.CharacterSpacing.ToEm(); + var characterSpacing = datePicker.CharacterSpacing.ToEm(); + platformDatePicker.CharacterSpacing = characterSpacing; + + var dateTextBlock = platformDatePicker.GetDescendantByName("DateText"); + if (dateTextBlock is not null) + { + dateTextBlock.CharacterSpacing = characterSpacing; + dateTextBlock.RefreshThemeResources(); + } } public static void UpdateFont(this CalendarDatePicker platformDatePicker, IDatePicker datePicker, IFontManager fontManager) => From 73d327c50cd9788832d86b64da5ba334de049301 Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Mon, 23 Jun 2025 13:02:12 +0530 Subject: [PATCH 2/8] Revert "fix added" This reverts commit 138797f06454b88d91cc6e868bace6e15a2101ed. --- src/Core/src/Platform/Windows/DatePickerExtensions.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Core/src/Platform/Windows/DatePickerExtensions.cs b/src/Core/src/Platform/Windows/DatePickerExtensions.cs index 3800866cfb6e..839fc8d9a4af 100644 --- a/src/Core/src/Platform/Windows/DatePickerExtensions.cs +++ b/src/Core/src/Platform/Windows/DatePickerExtensions.cs @@ -55,15 +55,7 @@ public static void UpdateMaximumDate(this CalendarDatePicker platformDatePicker, public static void UpdateCharacterSpacing(this CalendarDatePicker platformDatePicker, IDatePicker datePicker) { - var characterSpacing = datePicker.CharacterSpacing.ToEm(); - platformDatePicker.CharacterSpacing = characterSpacing; - - var dateTextBlock = platformDatePicker.GetDescendantByName("DateText"); - if (dateTextBlock is not null) - { - dateTextBlock.CharacterSpacing = characterSpacing; - dateTextBlock.RefreshThemeResources(); - } + platformDatePicker.CharacterSpacing = datePicker.CharacterSpacing.ToEm(); } public static void UpdateFont(this CalendarDatePicker platformDatePicker, IDatePicker datePicker, IFontManager fontManager) => From 88bb1b02a151a07bc78ebeca19f0c7b2e0347532 Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Wed, 13 Aug 2025 16:30:49 +0530 Subject: [PATCH 3/8] fix added --- .../Handlers/Items2/iOS/LayoutFactory2.cs | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs index a61b16aa851f..f3de84735eb9 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs @@ -558,6 +558,35 @@ public override CGPoint TargetContentOffset(CGPoint proposedContentOffset, CGPoi Configuration.ScrollDirection); } + public override CGSize CollectionViewContentSize + { + get + { + // Check if the collection has no items + if (CollectionView != null) + { + var numberOfSections = CollectionView.NumberOfSections(); + bool hasItems = false; + + for (nint section = 0; section < numberOfSections; section++) + { + if (CollectionView.NumberOfItemsInSection(section) > 0) + { + hasItems = true; + break; + } + } + + if (!hasItems) + { + return CGSize.Empty; + } + } + + return base.CollectionViewContentSize; + } + } + CGPoint ScrollSingle(SnapPointsAlignment alignment, CGPoint proposedContentOffset, CGPoint scrollingVelocity) { // Get the viewport of the UICollectionView at the current content offset From 64e06180083df9e2c052e75eab3ddbb6acd638ad Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:43:59 +0530 Subject: [PATCH 4/8] fix updated --- .../Core/Handlers/Items2/iOS/LayoutFactory2.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs index f3de84735eb9..e7ed7c11a077 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs @@ -562,31 +562,26 @@ public override CGSize CollectionViewContentSize { get { - // Check if the collection has no items if (CollectionView != null) { var numberOfSections = CollectionView.NumberOfSections(); - bool hasItems = false; - for (nint section = 0; section < numberOfSections; section++) { if (CollectionView.NumberOfItemsInSection(section) > 0) { - hasItems = true; - break; + return base.CollectionViewContentSize; } } - - if (!hasItems) - { - return CGSize.Empty; - } + + // No items found + return CGSize.Empty; } - + return base.CollectionViewContentSize; } } + CGPoint ScrollSingle(SnapPointsAlignment alignment, CGPoint proposedContentOffset, CGPoint scrollingVelocity) { // Get the viewport of the UICollectionView at the current content offset From 489c0c2867f7bd3a4cd88f007ac2223f9420e1ac Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Mon, 1 Sep 2025 18:57:34 +0530 Subject: [PATCH 5/8] modifed the fix --- .../Handlers/Items2/iOS/LayoutFactory2.cs | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs index e7ed7c11a077..5f60d6323853 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs @@ -93,7 +93,7 @@ static UICollectionViewLayout CreateListLayout(UICollectionViewScrollDirection s //create global header and footer layoutConfiguration.BoundarySupplementaryItems = CreateSupplementaryItems(null, layoutHeaderFooterInfo, scrollDirection, groupWidth, groupHeight); - var layout = new CustomUICollectionViewCompositionalLayout(snapInfo, (sectionIndex, environment) => + var layout = new CustomUICollectionViewCompositionalLayout(snapInfo, groupingInfo, layoutHeaderFooterInfo, (sectionIndex, environment) => { // Each item has a size var itemSize = NSCollectionLayoutSize.Create(itemWidth, itemHeight); @@ -151,7 +151,7 @@ static UICollectionViewLayout CreateGridLayout(UICollectionViewScrollDirection s var layoutConfiguration = new UICollectionViewCompositionalLayoutConfiguration(); layoutConfiguration.ScrollDirection = scrollDirection; - var layout = new CustomUICollectionViewCompositionalLayout(snapInfo, (sectionIndex, environment) => + var layout = new CustomUICollectionViewCompositionalLayout(snapInfo, groupingInfo, headerFooterInfo, (sectionIndex, environment) => { // Each item has a size var itemSize = NSCollectionLayoutSize.Create(itemWidth, itemHeight); @@ -450,11 +450,15 @@ class CustomUICollectionViewCompositionalLayout : UICollectionViewCompositionalL { LayoutSnapInfo _snapInfo; ItemsUpdatingScrollMode _itemsUpdatingScrollMode; + LayoutGroupingInfo? _groupingInfo; + LayoutHeaderFooterInfo? _headerFooterInfo; public CustomUICollectionViewCompositionalLayout(LayoutSnapInfo snapInfo, UICollectionViewCompositionalLayoutSectionProvider sectionProvider, UICollectionViewCompositionalLayoutConfiguration configuration, ItemsUpdatingScrollMode itemsUpdatingScrollMode) : base(sectionProvider, configuration) { _snapInfo = snapInfo; _itemsUpdatingScrollMode = itemsUpdatingScrollMode; + _groupingInfo = groupingInfo; + _headerFooterInfo = headerFooterInfo; } public override void FinalizeCollectionViewUpdates() @@ -499,7 +503,7 @@ void ForceScrollToLastItem(UICollectionView collectionView) } } } - + public override CGPoint TargetContentOffset(CGPoint proposedContentOffset, CGPoint scrollingVelocity) { var snapPointsType = _snapInfo.SnapType; @@ -573,7 +577,17 @@ public override CGSize CollectionViewContentSize } } - // No items found + // No items found, but check if we have headers or footers that should still be shown + bool hasGlobalHeaders = _headerFooterInfo?.HasHeader == true || _headerFooterInfo?.HasFooter == true; + bool hasGroupHeaders = _groupingInfo?.HasHeader == true || _groupingInfo?.HasFooter == true; + + if (hasGlobalHeaders || hasGroupHeaders) + { + // Return the base content size to allow headers/footers to be displayed + return base.CollectionViewContentSize; + } + + // No items and no headers/footers found return CGSize.Empty; } @@ -581,7 +595,6 @@ public override CGSize CollectionViewContentSize } } - CGPoint ScrollSingle(SnapPointsAlignment alignment, CGPoint proposedContentOffset, CGPoint scrollingVelocity) { // Get the viewport of the UICollectionView at the current content offset From 83feedd9dcc1ee7bc8789a82cbfeaad0284d8968 Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Wed, 10 Sep 2025 15:52:25 +0530 Subject: [PATCH 6/8] Update LayoutFactory2.cs --- .../Core/Handlers/Items2/iOS/LayoutFactory2.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs index 5f60d6323853..2799631017d2 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs @@ -568,26 +568,20 @@ public override CGSize CollectionViewContentSize { if (CollectionView != null) { - var numberOfSections = CollectionView.NumberOfSections(); - for (nint section = 0; section < numberOfSections; section++) - { - if (CollectionView.NumberOfItemsInSection(section) > 0) - { - return base.CollectionViewContentSize; - } - } - - // No items found, but check if we have headers or footers that should still be shown bool hasGlobalHeaders = _headerFooterInfo?.HasHeader == true || _headerFooterInfo?.HasFooter == true; bool hasGroupHeaders = _groupingInfo?.HasHeader == true || _groupingInfo?.HasFooter == true; if (hasGlobalHeaders || hasGroupHeaders) { - // Return the base content size to allow headers/footers to be displayed return base.CollectionViewContentSize; } - // No items and no headers/footers found + if (CollectionView.NumberOfSections() > 0 && + CollectionView.NumberOfItemsInSection(0) > 0) + { + return base.CollectionViewContentSize; + } + return CGSize.Empty; } From 075d3fb4921d7b90a1a3daef2ad5f25a76d9d4cb Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:42:59 +0530 Subject: [PATCH 7/8] Update LayoutFactory2.cs --- src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs index 2799631017d2..4692f4d4f799 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs @@ -453,7 +453,7 @@ class CustomUICollectionViewCompositionalLayout : UICollectionViewCompositionalL LayoutGroupingInfo? _groupingInfo; LayoutHeaderFooterInfo? _headerFooterInfo; - public CustomUICollectionViewCompositionalLayout(LayoutSnapInfo snapInfo, UICollectionViewCompositionalLayoutSectionProvider sectionProvider, UICollectionViewCompositionalLayoutConfiguration configuration, ItemsUpdatingScrollMode itemsUpdatingScrollMode) : base(sectionProvider, configuration) + public CustomUICollectionViewCompositionalLayout(LayoutSnapInfo snapInfo, LayoutGroupingInfo? groupingInfo, LayoutHeaderFooterInfo? headerFooterInfo, UICollectionViewCompositionalLayoutSectionProvider sectionProvider, UICollectionViewCompositionalLayoutConfiguration configuration, ItemsUpdatingScrollMode itemsUpdatingScrollMode) : base(sectionProvider, configuration) { _snapInfo = snapInfo; _itemsUpdatingScrollMode = itemsUpdatingScrollMode; From 9700f578feea468117eee74d88b448ca5b53b53e Mon Sep 17 00:00:00 2001 From: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:47:34 +0530 Subject: [PATCH 8/8] Update LayoutFactory2.cs --- src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs index 4692f4d4f799..235472aeab54 100644 --- a/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs +++ b/src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs @@ -503,7 +503,7 @@ void ForceScrollToLastItem(UICollectionView collectionView) } } } - + public override CGPoint TargetContentOffset(CGPoint proposedContentOffset, CGPoint scrollingVelocity) { var snapPointsType = _snapInfo.SnapType;