Skip to content

Fix CollectionView Header is not visible when ItemsSource is not set and an EmptyView is set in iOS, Mac platform#34989

Merged
kubaflo merged 9 commits into
dotnet:inflight/currentfrom
KarthikRajaKalaimani:fix-34897
Apr 16, 2026
Merged

Fix CollectionView Header is not visible when ItemsSource is not set and an EmptyView is set in iOS, Mac platform#34989
kubaflo merged 9 commits into
dotnet:inflight/currentfrom
KarthikRajaKalaimani:fix-34897

Additional scenario added in test case and improved the fix.

05ee0fb
Select commit
Loading
Failed to load commit list.
Azure Pipelines / maui-pr-uitests failed Apr 16, 2026 in 3h 0m 25s

Build #10.0.70-ci+pr.34989.azdo.1381544 had test failures

Details

Tests

  • Failed: 1,917 (9.20%)
  • Passed: 18,642 (89.44%)
  • Other: 283 (1.36%)
  • Total: 20,842

Annotations

Check failure on line 780 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / maui-pr-uitests

Build log #L780

PowerShell exited with code '1'.

Check failure on line 972 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / maui-pr-uitests

Build log #L972

PowerShell exited with code '1'.

Check failure on line 1025 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / maui-pr-uitests

Build log #L1025

PowerShell exited with code '1'.

Check failure on line 1 in Microsoft.Maui.TestCases.Tests.Issues.Issue33038(Android).LayoutShouldBeCorrectOnFirstNavigation

See this annotation in the file changed.

@azure-pipelines azure-pipelines / maui-pr-uitests

Microsoft.Maui.TestCases.Tests.Issues.Issue33038(Android).LayoutShouldBeCorrectOnFirstNavigation

VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: LayoutShouldBeCorrectOnFirstNavigation.png (2.05% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
Raw output
   at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue33038.LayoutShouldBeCorrectOnFirstNavigation() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33038.cs:line 22
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Check failure on line 1 in Microsoft.Maui.TestCases.Tests.Issues.Issue28986_FlyoutPage(iOS).ToolbarExtendsAllTheWayLeftAndRight_FlyoutPage

See this annotation in the file changed.

@azure-pipelines azure-pipelines / maui-pr-uitests

Microsoft.Maui.TestCases.Tests.Issues.Issue28986_FlyoutPage(iOS).ToolbarExtendsAllTheWayLeftAndRight_FlyoutPage

VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ToolbarExtendsAllTheWayLeftAndRight_FlyoutPage.png (0.77% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
Raw output
   at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue28986_FlyoutPage.ToolbarExtendsAllTheWayLeftAndRight_FlyoutPage() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28986_FlyoutPage.cs:line 27
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Check failure on line 1 in Microsoft.Maui.TestCases.Tests.MapFeatureTests(iOS).Map_IsVisible

See this annotation in the file changed.

@azure-pipelines azure-pipelines / maui-pr-uitests

Microsoft.Maui.TestCases.Tests.MapFeatureTests(iOS).Map_IsVisible

VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: Map_IsVisible.png (0.58% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
Raw output
   at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.MapFeatureTests.Map_IsVisible() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MapFeatureTests.cs:line 35
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Check failure on line 1 in Microsoft.Maui.TestCases.Tests.DatePickerFeatureTests(iOS).DatePicker_Format_f_FullDateShortTime

See this annotation in the file changed.

@azure-pipelines azure-pipelines / maui-pr-uitests

Microsoft.Maui.TestCases.Tests.DatePickerFeatureTests(iOS).DatePicker_Format_f_FullDateShortTime

VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: DatePicker_Format_f_FullDateShortTime.png (0.60% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
Raw output
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.DatePickerFeatureTests.DatePicker_Format_f_FullDateShortTime() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/DatePickerFeatureTests.cs:line 424
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)