Skip to content

Commit 9b3c784

Browse files
authored
[2025/04/21] Candidate - In Flight Branch (#29037)
### Description of Change ## .NET MAUI Release Notes - Inflight/Candidate ## What's Changed ### MAUI Product Fixes * Fix CarouselView layout SR6 regressions by @albyrock87 in #29035 * Revert "[Android] picker - focus/unfocus events (#28122)" by @PureWeen in https://github.com/dotnet/maui/pull/1fb5164929 * [Windows] Fixed the flyout content width not being set correctly after updating to WinUI SDK 1.7 by @Tamilarasan-Paranthaman in #28996 * [Android] picker - focus/unfocus events by @kubaflo in #28122 * [XC] add IRootObjectProvider by @StephaneDelcroix in #28310 * [iOS] Fix for the File.ContentType from MediaPicker not being in valid MIME format by @SyedAbdulAzeemSF4852 in #28842 * [Android] Fixed the Incorrect Text Color Applied to Selected Tab in TabbedPage by @Ahamed-Ali in #28844 * [iOS] Fix FlyoutPage does not respond to changes in the FlyoutLayoutBehavior property by @devanathan-vaithiyanathan in #28884 * [Android] Fixed ScalingCanvas.SetBlur not working by @NirmalKumarYuvaraj in #28911 * [iOS] - Resolved Proper Rendering of Dynamic Header/Footer Updates in CV2 by @prakashKannanSf3972 in #28641 * [iOS] Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 by @Ahamed-Ali in #28890 * [Windows] - Fix Visual State Issue with Picker TextColor After Navigation by @prakashKannanSf3972 in #28746 ### Dependency Updates * [Windows] Upgrade to Windows App SDK 1.7 by @MartyIX in #28499 ### Testing * [Testing] Feature Matrix UITest Cases for CollectionView EmptyView Feature by @NafeelaNazhir in #28679 * Fixed Test case failure in PR 29037 - [2025/04/21] Candidate by @HarishKumarSF4517 in #29049 **Full Changelog**: main...inflight/candidate For more information about inflight process check https://github.com/dotnet/maui/wiki/Inflight-Branch-Process
2 parents b43b974 + b1c026c commit 9b3c784

File tree

76 files changed

+4145
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4145
-164
lines changed

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
6262
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
6363
<!-- wasdk -->
64-
<MicrosoftWindowsAppSDKPackageVersion>1.6.250228001</MicrosoftWindowsAppSDKPackageVersion>
64+
<MicrosoftWindowsAppSDKPackageVersion>1.7.250401001</MicrosoftWindowsAppSDKPackageVersion>
6565
<MicrosoftWindowsSDKBuildToolsPackageVersion>10.0.22621.756</MicrosoftWindowsSDKBuildToolsPackageVersion>
6666
<MicrosoftGraphicsWin2DPackageVersion>1.2.0</MicrosoftGraphicsWin2DPackageVersion>
6767
<MicrosoftWindowsWebView2PackageVersion>1.0.2903.40</MicrosoftWindowsWebView2PackageVersion>

src/Controls/src/Build.Tasks/NodeILExtensions.cs

+26-3
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,8 @@ public static IEnumerable<Instruction> PushServiceProvider(this INode node, ILCo
625625
//Add a SimpleValueTargetProvider and register it as IProvideValueTarget, IReferenceProvider and IProvideParentValues
626626
if (createAllServices
627627
|| requiredServices.Contains(module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IProvideParentValues")), TypeRefComparer.Default)
628-
|| requiredServices.Contains(module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IReferenceProvider")), TypeRefComparer.Default))
628+
|| requiredServices.Contains(module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IReferenceProvider")), TypeRefComparer.Default)
629+
|| requiredServices.Contains(module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IRootObjectProvider")), TypeRefComparer.Default))
629630
{
630631
alreadyContainsProvideValueTarget = true;
631632
var pushParentIl = node.PushParentObjectsArray(context).ToList();
@@ -644,9 +645,25 @@ public static IEnumerable<Instruction> PushServiceProvider(this INode node, ILCo
644645
foreach (var instruction in PushNamescopes(node, context, module))
645646
yield return instruction;
646647

647-
yield return Create(Ldc_I4_0); //don't ask
648+
//rootObject
649+
if (context.Root is VariableDefinition rootVariable)
650+
yield return Create(Ldloc, rootVariable);
651+
else if (context.Root is FieldReference rootField)
652+
{
653+
yield return Create(Ldarg_0);
654+
yield return Create(Ldfld, rootField);
655+
}
656+
else
657+
yield return Create(Ldnull);
658+
648659
yield return Create(Newobj, module.ImportCtorReference(context.Cache,
649-
("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml.Internals", "SimpleValueTargetProvider"), paramCount: 4));
660+
type: ("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml.Internals", "SimpleValueTargetProvider"),
661+
parameterTypes: [
662+
("mscorlib", "System", "Object[]"),
663+
("mscorlib", "System", "Object"),
664+
("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Internals", "INameScope[]"),
665+
("mscorlib", "System", "Object"),
666+
]));
650667

651668
//store the provider so we can register it again with a different key
652669
yield return Create(Dup);
@@ -660,6 +677,12 @@ public static IEnumerable<Instruction> PushServiceProvider(this INode node, ILCo
660677
yield return Create(Call, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Type"), methodName: "GetTypeFromHandle", parameterTypes: new[] { ("mscorlib", "System", "RuntimeTypeHandle") }, isStatic: true));
661678
yield return Create(Ldloc, refProvider);
662679
yield return Create(Callvirt, addService);
680+
681+
yield return Create(Dup); //Keep the serviceProvider on the stack
682+
yield return Create(Ldtoken, module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IRootObjectProvider")));
683+
yield return Create(Call, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Type"), methodName: "GetTypeFromHandle", parameterTypes: new[] { ("mscorlib", "System", "RuntimeTypeHandle") }, isStatic: true));
684+
yield return Create(Ldloc, refProvider);
685+
yield return Create(Callvirt, addService);
663686
}
664687
}
665688

src/Controls/src/Build.Tasks/XamlCache.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Microsoft.Maui.Controls.XamlC;
44
using Mono.Cecil;
55
using Mono.Cecil.Cil;
6+
using Mono.Cecil.Rocks;
67

78
namespace Microsoft.Maui.Controls.Build.Tasks;
89

@@ -38,8 +39,13 @@ public TypeDefinition Resolve(TypeReference typeReference) =>
3839
public FieldReference GetOrAddFieldReference((ModuleDefinition module, string fieldRefKey) key, Func<(ModuleDefinition module, string fieldRefKey), FieldReference> valueFactory) =>
3940
GetOrAdd(_fieldReferenceCache, key, valueFactory);
4041

41-
public TypeReference GetOrAddTypeReference(ModuleDefinition module, (string assemblyName, string clrNamespace, string typeName) type) =>
42-
GetOrAdd(_typeReferenceCache, (module, type.ToString()), x => x.module.ImportReference(x.module.GetTypeDefinition(this, type)));
42+
public TypeReference GetOrAddTypeReference(ModuleDefinition module, (string assemblyName, string clrNamespace, string typeName) type) => GetOrAdd(_typeReferenceCache, (module, type.ToString()), x =>
43+
{
44+
if (type.typeName.EndsWith("[]", StringComparison.InvariantCultureIgnoreCase))
45+
return x.module.GetTypeDefinition(this, (type.assemblyName, type.clrNamespace, type.typeName.Substring(0, type.typeName.Length-2))).MakeArrayType();
46+
else
47+
return x.module.ImportReference(x.module.GetTypeDefinition(this, type));
48+
});
4349

4450
public TypeReference GetOrAddTypeReference(ModuleDefinition module, string typeKey, Func<(ModuleDefinition module, string typeKey), TypeReference> valueFactory) =>
4551
GetOrAdd(_typeReferenceCache, (module, typeKey), valueFactory);

src/Controls/src/Core/Compatibility/Handlers/FlyoutPage/iOS/PhoneFlyoutPageRenderer.cs

+21
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
366366
UpdateBackground();
367367
else if (e.PropertyName == PlatformConfiguration.iOSSpecific.FlyoutPage.ApplyShadowProperty.PropertyName)
368368
UpdateApplyShadow(((FlyoutPage)Element).OnThisPlatform().GetApplyShadow());
369+
else if (e.PropertyName == Microsoft.Maui.Controls.FlyoutPage.FlyoutLayoutBehaviorProperty.PropertyName)
370+
UpdateFlyoutLayoutBehaviorChanges();
369371
else if (e.PropertyName == PlatformConfiguration.iOSSpecific.Page.PrefersHomeIndicatorAutoHiddenProperty.PropertyName ||
370372
e.PropertyName == PlatformConfiguration.iOSSpecific.Page.PrefersStatusBarHiddenProperty.PropertyName)
371373
UpdatePageSpecifics();
@@ -476,6 +478,25 @@ void LayoutChildren(bool animated)
476478
UpdateClickOffViewFrame();
477479
}
478480

481+
void UpdateFlyoutLayoutBehaviorChanges()
482+
{
483+
LayoutChildren(true);
484+
if (FlyoutPage is null)
485+
return;
486+
FlyoutLayoutBehavior flyoutBehavior = FlyoutPage.FlyoutLayoutBehavior;
487+
bool shouldPresent = FlyoutPageController.ShouldShowSplitMode;
488+
if (flyoutBehavior == FlyoutLayoutBehavior.Popover || flyoutBehavior == FlyoutLayoutBehavior.Default)
489+
{
490+
shouldPresent = false;
491+
}
492+
493+
if (shouldPresent != FlyoutPage.IsPresented)
494+
{
495+
((IElementController)Element).SetValueFromRenderer(FlyoutPage.IsPresentedProperty, shouldPresent);
496+
UpdateLeftBarButton();
497+
}
498+
}
499+
479500
void PackContainers()
480501
{
481502
_detailController.View.BackgroundColor = new UIColor(1, 1, 1, 1);

src/Controls/src/Core/Handlers/Items/iOS/CarouselTemplatedCell.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ public override void ConstrainTo(CGSize constraint)
3232

3333
public override CGSize Measure()
3434
{
35-
return new CGSize(_constraint.Width, _constraint.Height);
35+
// Go through the measure pass even if the constraints are fixed
36+
// to ensure arrange pass has the appropriate desired size in place.
37+
PlatformHandler.VirtualView.Measure(_constraint.Width, _constraint.Height);
38+
return _constraint;
3639
}
3740

3841
protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize)
@@ -42,7 +45,7 @@ protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize)
4245

4346
protected override bool AttributesConsistentWithConstrainedDimension(UICollectionViewLayoutAttributes attributes)
4447
{
45-
return false;
48+
return _constraint.IsCloseTo(attributes.Frame.Size);
4649
}
4750
}
4851
}

src/Controls/src/Core/Handlers/Items/iOS/CarouselViewController.cs

+3
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ protected override string DetermineCellReuseId(NSIndexPath indexPath)
199199
return base.DetermineCellReuseId(NSIndexPath.FromItemSection(itemIndex, 0));
200200
}
201201

202+
private protected override (Type CellType, string CellTypeReuseId) DetermineTemplatedCellType()
203+
=> (typeof(CarouselTemplatedCell), "maui_carousel");
204+
202205
protected override void RegisterViewTypes()
203206
{
204207
CollectionView.RegisterClassForCell(typeof(CarouselTemplatedCell), CarouselTemplatedCell.ReuseId);

src/Controls/src/Core/Handlers/Items/iOS/ItemsViewController.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ protected virtual string DetermineCellReuseId(NSIndexPath indexPath)
503503
var dataTemplate = ItemsView.ItemTemplate.SelectDataTemplate(item, ItemsView);
504504

505505
var cellOrientation = ItemsViewLayout.ScrollDirection == UICollectionViewScrollDirection.Vertical ? "v" : "h";
506-
var cellType = ItemsViewLayout.ScrollDirection == UICollectionViewScrollDirection.Vertical ? typeof(VerticalCell) : typeof(HorizontalCell);
506+
(Type cellType, var cellTypeReuseId) = DetermineTemplatedCellType();
507507

508-
var reuseId = $"_maui_{cellOrientation}_{dataTemplate.Id}";
508+
var reuseId = $"_{cellTypeReuseId}_{cellOrientation}_{dataTemplate.Id}";
509509

510510
if (!_cellReuseIds.Contains(reuseId))
511511
{
@@ -521,6 +521,11 @@ protected virtual string DetermineCellReuseId(NSIndexPath indexPath)
521521
: VerticalDefaultCell.ReuseId;
522522
}
523523

524+
private protected virtual (Type CellType, string CellTypeReuseId) DetermineTemplatedCellType()
525+
{
526+
return (ItemsViewLayout.ScrollDirection == UICollectionViewScrollDirection.Vertical ? typeof(VerticalCell) : typeof(HorizontalCell), "maui");
527+
}
528+
524529
[Obsolete("Use DetermineCellReuseId(NSIndexPath indexPath) instead.")]
525530
protected virtual string DetermineCellReuseId()
526531
{

src/Controls/src/Core/Handlers/Items2/CarouselViewHandler2.iOS.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ protected override CarouselViewController2 CreateController(CarouselView newElem
3838

3939
protected override UICollectionViewLayout SelectLayout()
4040
{
41-
bool IsHorizontal = VirtualView.ItemsLayout.Orientation == ItemsLayoutOrientation.Horizontal;
42-
UICollectionViewScrollDirection scrollDirection = IsHorizontal ? UICollectionViewScrollDirection.Horizontal : UICollectionViewScrollDirection.Vertical;
41+
bool isHorizontal = VirtualView.ItemsLayout.Orientation == ItemsLayoutOrientation.Horizontal;
4342

4443
NSCollectionLayoutDimension itemWidth = NSCollectionLayoutDimension.CreateFractionalWidth(1);
4544
NSCollectionLayoutDimension itemHeight = NSCollectionLayoutDimension.CreateFractionalHeight(1);
@@ -55,7 +54,7 @@ protected override UICollectionViewLayout SelectLayout()
5554
return null;
5655
}
5756
double sectionMargin = 0.0;
58-
if (!IsHorizontal)
57+
if (!isHorizontal)
5958
{
6059
sectionMargin = VirtualView.PeekAreaInsets.VerticalThickness / 2;
6160
var newGroupHeight = environment.Container.ContentSize.Height - VirtualView.PeekAreaInsets.VerticalThickness;
@@ -81,19 +80,19 @@ protected override UICollectionViewLayout SelectLayout()
8180

8281
if (OperatingSystem.IsIOSVersionAtLeast(16))
8382
{
84-
group = IsHorizontal ? NSCollectionLayoutGroup.GetHorizontalGroup(groupSize, item, 1) :
83+
group = isHorizontal ? NSCollectionLayoutGroup.GetHorizontalGroup(groupSize, item, 1) :
8584
NSCollectionLayoutGroup.GetVerticalGroup(groupSize, item, 1);
8685
}
8786
else
8887
{
89-
group = IsHorizontal ? NSCollectionLayoutGroup.CreateHorizontal(groupSize, item, 1) :
88+
group = isHorizontal ? NSCollectionLayoutGroup.CreateHorizontal(groupSize, item, 1) :
9089
NSCollectionLayoutGroup.CreateVertical(groupSize, item, 1);
9190
}
9291

9392
// Create our section layout
9493
var section = NSCollectionLayoutSection.Create(group: group);
9594
section.InterGroupSpacing = itemSpacing;
96-
section.OrthogonalScrollingBehavior = IsHorizontal ? UICollectionLayoutSectionOrthogonalScrollingBehavior.GroupPagingCentered : UICollectionLayoutSectionOrthogonalScrollingBehavior.None;
95+
section.OrthogonalScrollingBehavior = isHorizontal ? UICollectionLayoutSectionOrthogonalScrollingBehavior.GroupPagingCentered : UICollectionLayoutSectionOrthogonalScrollingBehavior.None;
9796
section.VisibleItemsInvalidationHandler = (items, offset, env) =>
9897
{
9998
//This will allow us to SetPosition when we are scrolling the items

src/Controls/src/Core/Handlers/Items2/CollectionViewHandler2.iOS.cs

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public CollectionViewHandler2(PropertyMapper mapper = null) : base(mapper ?? Map
5656
[StructuredItemsView.FooterTemplateProperty.PropertyName] = MapFooterTemplate,
5757
[StructuredItemsView.HeaderProperty.PropertyName] = MapHeaderTemplate,
5858
[StructuredItemsView.FooterProperty.PropertyName] = MapFooterTemplate,
59+
[GroupableItemsView.GroupHeaderTemplateProperty.PropertyName] = MapHeaderTemplate,
60+
[GroupableItemsView.GroupFooterTemplateProperty.PropertyName] = MapFooterTemplate,
5961
};
6062
}
6163

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#nullable disable
2+
using CoreGraphics;
3+
using Foundation;
4+
using Microsoft.Maui.Graphics;
5+
using UIKit;
6+
7+
namespace Microsoft.Maui.Controls.Handlers.Items2
8+
{
9+
internal sealed class CarouselTemplatedCell2 : TemplatedCell2
10+
{
11+
internal new const string ReuseId = "Microsoft.Maui.Controls.CarouselTemplatedCell2";
12+
13+
[Export("initWithFrame:")]
14+
[Microsoft.Maui.Controls.Internals.Preserve(Conditional = true)]
15+
public CarouselTemplatedCell2(CGRect frame) : base(frame)
16+
{
17+
}
18+
19+
private protected override Size GetMeasureConstraints(UICollectionViewLayoutAttributes preferredAttributes)
20+
=> preferredAttributes.Size.ToSize();
21+
}
22+
}

src/Controls/src/Core/Handlers/Items2/iOS/CarouselViewController2.cs

+24-26
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ protected override string DetermineCellReuseId(NSIndexPath indexPath)
117117
return base.DetermineCellReuseId(itemIndex);
118118
}
119119

120+
private protected override (Type CellType, string CellTypeReuseId) DetermineTemplatedCellType()
121+
=> (typeof(CarouselTemplatedCell2), CarouselTemplatedCell2.ReuseId);
122+
120123
protected override Items.IItemsViewSource CreateItemsViewSource()
121124
{
122125
var itemsSource = ItemsSourceFactory2.CreateForCarouselView(ItemsView.ItemsSource, this, ItemsView.Loop);
@@ -506,54 +509,49 @@ async Task UpdateInitialPosition()
506509
return;
507510
}
508511

509-
int position = carousel.Position;
510-
var currentItem = carousel.CurrentItem;
511-
512-
if (currentItem != null)
513-
{
514-
// Sometimes the item could be just being removed while we navigate back to the CarouselView
515-
var positionCurrentItem = ItemsSource.GetIndexForItem(currentItem).Row;
516-
if (positionCurrentItem != -1)
517-
{
518-
position = positionCurrentItem;
519-
}
520-
}
521-
522-
var projectedPosition = NSIndexPath.FromItemSection(position, _section);
523-
524-
if (LoopItemsSource.Loop)
525-
{
526-
//We need to set the position to the correct position since we added 1 item at the beginning
527-
projectedPosition = GetScrollToIndexPath(position);
528-
}
529-
530-
var uICollectionViewScrollPosition = IsHorizontal ? UICollectionViewScrollPosition.CenteredHorizontally : UICollectionViewScrollPosition.CenteredVertically;
531-
532-
await Task.Delay(100).ContinueWith((t) =>
512+
await Task.Delay(100).ContinueWith(_ =>
533513
{
534514
MainThread.BeginInvokeOnMainThread(() =>
535515
{
536516
if (!IsViewLoaded)
537517
{
538518
return;
539519
}
520+
540521
InitialPositionSet = true;
541522

542523
if (ItemsSource is null || ItemsSource.ItemCount == 0)
543524
{
544525
return;
545526
}
546527

528+
int position = carousel.Position;
529+
var currentItem = carousel.CurrentItem;
530+
531+
if (currentItem != null)
532+
{
533+
// Sometimes the item could be just being removed while we navigate back to the CarouselView
534+
var positionCurrentItem = ItemsSource.GetIndexForItem(currentItem).Row;
535+
if (positionCurrentItem != -1)
536+
{
537+
position = positionCurrentItem;
538+
}
539+
}
540+
541+
var projectedPosition = LoopItemsSource.Loop
542+
? GetScrollToIndexPath(position) // We need to set the position to the correct position since we added 1 item at the beginning
543+
: NSIndexPath.FromItemSection(position, _section);
544+
545+
var uICollectionViewScrollPosition = IsHorizontal ? UICollectionViewScrollPosition.CenteredHorizontally : UICollectionViewScrollPosition.CenteredVertically;
546+
547547
CollectionView.ScrollToItem(projectedPosition, uICollectionViewScrollPosition, false);
548548

549549
//Set the position on VirtualView to update the CurrentItem also
550550
SetPosition(position);
551551

552552
UpdateVisualStates();
553553
});
554-
555554
});
556-
557555
}
558556

559557
void UpdateVisualStates()

src/Controls/src/Core/Handlers/Items2/iOS/GroupableItemsViewController2.cs

+10-14
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,14 @@ protected override void RegisterViewTypes()
6161
private protected override void RegisterSupplementaryViews(UICollectionElementKindSection kind)
6262
{
6363
base.RegisterSupplementaryViews(kind);
64-
if (IsHorizontal)
65-
{
66-
CollectionView.RegisterClassForSupplementaryView(typeof(HorizontalSupplementaryView2),
67-
kind, HorizontalSupplementalView2ReuseId);
68-
CollectionView.RegisterClassForSupplementaryView(typeof(HorizontalDefaultSupplementalView2),
69-
kind, HorizontalDefaultSupplementalView2ReuseId);
70-
}
71-
else
72-
{
73-
CollectionView.RegisterClassForSupplementaryView(typeof(VerticalSupplementaryView2),
74-
kind, VerticalSupplementaryView2ReuseId);
75-
CollectionView.RegisterClassForSupplementaryView(typeof(VerticalDefaultSupplementalView2),
76-
kind, VerticalDefaultSupplementalView2ReuseId);
77-
}
64+
CollectionView.RegisterClassForSupplementaryView(typeof(HorizontalSupplementaryView2),
65+
kind, HorizontalSupplementalView2ReuseId);
66+
CollectionView.RegisterClassForSupplementaryView(typeof(HorizontalDefaultSupplementalView2),
67+
kind, HorizontalDefaultSupplementalView2ReuseId);
68+
CollectionView.RegisterClassForSupplementaryView(typeof(VerticalSupplementaryView2),
69+
kind, VerticalSupplementaryView2ReuseId);
70+
CollectionView.RegisterClassForSupplementaryView(typeof(VerticalDefaultSupplementalView2),
71+
kind, VerticalDefaultSupplementalView2ReuseId);
7872
}
7973

8074
string DetermineViewReuseId(NSString elementKind)
@@ -133,7 +127,9 @@ void UpdateTemplatedSupplementaryView(TemplatedCell2 cell, NSString elementKind,
133127

134128
var bindingContext = ItemsSource.Group(indexPath);
135129

130+
cell.isHeaderOrFooterChanged = true;
136131
cell.Bind(template, bindingContext, ItemsView);
132+
cell.isHeaderOrFooterChanged = false;
137133

138134
// if (cell is ItemsViewCell2)
139135
// {

0 commit comments

Comments
 (0)