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.
Build Analysis / Build Analysis failed Apr 16, 2026 in 0s

.NET Result Analysis

Details

Tip

To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.

Known Repository Errors

Known Infrastructure Errors

Build Failures

maui-pr / Run Helix Unit Tests / Windows Helix Unit Tests (Debug) / 🛠️ Build BuildTasks

[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]
    ❌src\Core\src\Platform\Windows\RootNavigationView.cs(285,37): error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?)
    ❌.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(845,9): error MSB3073: The command ""D:\a\_work\1\s\.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\..\tools\net6.0\..\net472\XamlCompiler.exe" "D:\a\_work\1\s\artifacts\obj\Core\Debug\net10.0-windows10.0.19041.0\\input.json" "D:\a\_work\1\s\artifacts\obj\Core\Debug\net10.0-windows10.0.19041.0\\output.json"" exited with code 1.
    ❌.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(845,9): error MSB3073: The command ""D:\a\_work\1\s\.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\..\tools\net6.0\..\net472\XamlCompiler.exe" "D:\a\_work\1\s\artifacts\obj\Core\Debug\net10.0-windows10.0.20348.0\\input.json" "D:\a\_work\1\s\artifacts\obj\Core\Debug\net10.0-windows10.0.20348.0\\output.json"" exited with code 1.

maui-pr / Run Helix Unit Tests / Windows Helix Unit Tests (Release) / 🛠️ Build BuildTasks

[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]
    ❌src\Core\src\Platform\Windows\RootNavigationView.cs(285,37): error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?)
    ❌.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(845,9): error MSB3073: The command ""D:\a\_work\1\s\.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\..\tools\net6.0\..\net472\XamlCompiler.exe" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.19041.0\\input.json" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.19041.0\\output.json"" exited with code 1.
    ❌.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(845,9): error MSB3073: The command ""D:\a\_work\1\s\.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\..\tools\net6.0\..\net472\XamlCompiler.exe" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.20348.0\\input.json" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.20348.0\\output.json"" exited with code 1.

maui-pr / Pack .NET MAUI / Pack Windows / Pack & Publish

[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]
    ❌src\Core\src\Platform\Windows\RootNavigationView.cs(285,37): error CS1061: 'MauiToolbar' does not contain a definition for 'HasMenuBarContent' and no accessible extension method 'HasMenuBarContent' accepting a first argument of type 'MauiToolbar' could be found (are you missing a using directive or an assembly reference?)
    ❌.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(845,9): error MSB3073: The command ""D:\a\_work\1\s\.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\..\tools\net6.0\..\net472\XamlCompiler.exe" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.19041.0\\input.json" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.19041.0\\output.json"" exited with code 1.
    ❌.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(845,9): error MSB3073: The command ""D:\a\_work\1\s\.packages\microsoft.windowsappsdk.winui\1.8.251105000\buildTransitive\..\tools\net6.0\..\net472\XamlCompiler.exe" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.20348.0\\input.json" "D:\a\_work\1\s\artifacts\obj\Core\Release\net10.0-windows10.0.20348.0\\output.json"" exited with code 1.

42 other jobs are failing and were not displayed due to space limitations.
Builds with failures: [maui-pr] [maui-pr-uitests]

Known test errors

Test Failures (915 tests failed)

🔹 [All failing tests from maui-pr-uitests]

    ⚠️ 910 failing tests not displayed for this pipeline due to space limitations

    Maui.Controls.TestCases.Tests.Issues.Issue33227(iOS).ShellColorsResetOnNavigation [Details] [5.59% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    VisualTestUtils.VisualTestFailedException : 
    Snapshot different than baseline: ShellColorsResetOnNavigation.png (1.11% 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

    CallStack
       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 Maui.Controls.TestCases.Tests.Issues.Issue33227.ShellColorsResetOnNavigation() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33227.cs:line 33
       at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    
    Microsoft.Maui.TestCases.Tests.AbsoluteLayoutFeatureTests(iOS).VerifyAbsoluteLayout_AllProportional [Details] [21.96% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    VisualTestUtils.VisualTestFailedException : 
    Snapshot different than baseline: VerifyAbsoluteLayout_AllProportional.png (0.68% 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

    CallStack
       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.AbsoluteLayoutFeatureTests.VerifyAbsoluteLayout_AllProportional() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AbsoluteLayoutFeatureTests.cs:line 290
       at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    
    Microsoft.Maui.TestCases.Tests.AbsoluteLayoutFeatureTests(iOS).VerifyAbsoluteLayout_FlowDirection [Details] [21.97% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    VisualTestUtils.VisualTestFailedException : 
    Snapshot different than baseline: VerifyAbsoluteLayout_FlowDirection.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

    CallStack
       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.AbsoluteLayoutFeatureTests.VerifyAbsoluteLayout_FlowDirection() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AbsoluteLayoutFeatureTests.cs:line 336
       at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    
    Microsoft.Maui.TestCases.Tests.AbsoluteLayoutFeatureTests(iOS).VerifyAbsoluteLayout_HeightProportional [Details] [21.97% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    VisualTestUtils.VisualTestFailedException : 
    Snapshot different than baseline: VerifyAbsoluteLayout_HeightProportional.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

    CallStack
       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.AbsoluteLayoutFeatureTests.VerifyAbsoluteLayout_HeightProportional() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AbsoluteLayoutFeatureTests.cs:line 206
       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)
    
    Microsoft.Maui.TestCases.Tests.AbsoluteLayoutFeatureTests(iOS).VerifyAbsoluteLayout_LayoutBounds [Details] [21.96% failure rate]
    [ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]

    Failing Configuration

    Exception Message
    VisualTestUtils.VisualTestFailedException : 
    Snapshot different than baseline: VerifyAbsoluteLayout_LayoutBounds.png (0.68% 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

    CallStack
       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.AbsoluteLayoutFeatureTests.VerifyAbsoluteLayout_LayoutBounds() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/AbsoluteLayoutFeatureTests.cs:line 53
       at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    

Was this helpful? Yes No