[Windows] Fixed the EmptyView and EmptyViewTemplate issues in CollectionView#28472
[Windows] Fixed the EmptyView and EmptyViewTemplate issues in CollectionView#28472Ahamed-Ali wants to merge 4 commits intodotnet:mainfrom
Conversation
|
Hey there @Ahamed-Ali! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes two issues related to the EmptyView and EmptyViewTemplate in CollectionView on Windows by ensuring that EmptyViewTemplate is correctly handled and that EmptyView is updated even when ItemsSource is null.
- Removed the early return for null ItemsSource to allow empty view updates.
- Updated the EmptyView and EmptyViewTemplate logic in ItemsViewHandler.Windows.cs.
- Added new automated tests in both TestCases.Shared.Tests and TestCases.HostApp to verify the fixes.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28334.cs | Introduces new tests for EmptyView and EmptyViewTemplate behavior. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue28334.xaml.cs | Adds UI test logic to trigger and verify the corrected EmptyView/Template behavior. |
| src/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs | Modifies the update logic for ItemsSource and EmptyView to handle null ItemsSource and incorporate EmptyViewTemplate. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue25224.xaml.cs | Improves data template selection logic with proper type checking for string items. |
| src/Controls/src/Core/Handlers/Items/GroupableItemsViewHandler.Windows.cs | Updates guard clauses in CreateCollectionViewSource to ensure itemsSource is valid before using it. |
Files not reviewed (1)
- src/Controls/tests/TestCases.HostApp/Issues/Issue28334.xaml: Language not supported
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
src/Controls/src/Core/Handlers/Items/GroupableItemsViewHandler.Windows.cs
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
I have committed the pending images @jsuarezruiz |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
3a235f4 to
434c2d3
Compare
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
🤖 AI Summary📊 Expand Full Review —
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #28472 | Remove early return in UpdateItemsSource, add null guards in CreateCollectionViewSource (base + grouped), prioritize EmptyViewTemplate in UpdateEmptyView. |
✅ PASSED (Gate) | ItemsViewHandler.Windows.cs, GroupableItemsViewHandler.Windows.cs + tests |
Original PR fix |
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (claude-opus-4.6) | Keep early return in UpdateItemsSource, call UpdateEmptyViewVisibility() before returning; fix UpdateEmptyView to handle EmptyViewTemplate when EmptyView is null. |
✅ PASS | 1 file (ItemsViewHandler.Windows.cs) |
Minimal: no changes to CreateCollectionViewSource or GroupableItemsViewHandler |
| 2 | try-fix (claude-sonnet-4.6) | Fix at mapper level: add UpdateEmptyViewVisibility() in MapItemsSource when ItemsSource == null; add EmptyViewTemplate priority block at top of UpdateEmptyView(). |
✅ PASS | 1 file (ItemsViewHandler.Windows.cs) |
No changes to CreateCollectionViewSource or GroupableItemsViewHandler; cleanest separation of concerns |
| 3 | try-fix (gpt-5.3-codex) | Lazy empty-view materialization: trigger UpdateEmptyViewVisibility() from CleanUpCollectionViewSource() when ItemsSource is null; lazily realize EmptyViewTemplate inside UpdateEmptyViewVisibility(). |
✅ PASS | 1 file (ItemsViewHandler.Windows.cs) |
Required 2 iterations; more complex coupling between cleanup and visibility |
| 4 | try-fix (gpt-5.4, sub for gemini) | Added dedicated UpdateEmptyViewTemplate() path for MapEmptyViewTemplate; used try/finally in UpdateItemsSource() to always call UpdateEmptyViewVisibility() while keeping null-source early return. |
✅ PASS | 1 file (ItemsViewHandler.Windows.cs) |
Clean try/finally approach; passed 3/3 first try |
| PR | PR #28472 | Remove early return entirely, add itemsSource is not null guards in CreateCollectionViewSource (base + grouped), prioritize EmptyViewTemplate first in UpdateEmptyView. |
✅ PASSED (Gate) | 2 files | Original PR |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | Yes | NEW IDEA: Push empty-state detection into FormsListView/FormsGridView (platform layer, reactive callbacks) — architectural overreach for this bug |
| claude-sonnet-4.6 | 2 | No | NO NEW IDEAS |
| gpt-5.3-codex | 2 | Yes | NEW IDEA: Patch CarouselViewHandler null early-return — out of scope for Issue28334 tests |
| gpt-5.4 | 2 | No | NO NEW IDEAS |
Exhausted: Yes (2/4 models said NO NEW IDEAS; 2 new ideas were out of scope or architectural overreach)
Selected Fix: Candidate #1 — simplest, most targeted: 1 file, ~6 lines, preserves original early-return intent, no ripple changes needed in CreateCollectionViewSource or GroupableItemsViewHandler
📋 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Issue #28334, PR #28472 context captured; 2 impl files + 16 test files changed |
| Gate | ✅ PASSED | Windows — tests fail without fix, pass with fix |
| Try-Fix | ✅ COMPLETE | 4 attempts, all 4 passing; best alternative identified |
| Report | ✅ COMPLETE |
Summary
PR #28472 correctly fixes both CollectionView bugs on Windows (EmptyViewTemplate not shown when ItemsSource is null; EmptyView not shown when set before ItemsSource is cleared). The gate tests pass. However, a simpler single-file alternative (Candidate #1) passes the same tests with fewer changes and no side-effect risk.
Root Cause
Two independent root causes:
UpdateItemsSource()had an early return (if (Element.ItemsSource == null) return) that skippedUpdateEmptyViewVisibility()when ItemsSource was set to null.UpdateEmptyView()bailed out withif (emptyView == null) returnbefore checkingEmptyViewTemplate, so template-based empty views were never realized when onlyEmptyViewTemplatewas set (withoutEmptyView).
Fix Quality
PR's approach removes the early return entirely and adds null-source guards in both CreateCollectionViewSource() (base class) and GroupableItemsViewHandler.Windows.cs. While functional, this is a broader change than necessary: the early return was not wrong conceptually (no need to build a CollectionViewSource for null data), it just needed to ensure empty view visibility was updated before exiting.
Best alternative (Candidate #1):
// UpdateItemsSource() — add one line before the early return
if (Element.ItemsSource == null)
{
+ UpdateEmptyViewVisibility();
return;
}
// UpdateEmptyView() — widen the null guard and add template priority
var emptyViewTemplate = Element.EmptyViewTemplate;
-if (emptyView == null)
+if (emptyView == null && emptyViewTemplate == null)
{
return;
}
+if (emptyViewTemplate is not null)
+{
+ _emptyView = RealizeEmptyViewTemplate(emptyView, emptyViewTemplate);
+}
else { /* original switch */ }Why the alternative is better:
- Touches 1 file vs 2 files in the PR
- Preserves the early-return intent (don't build a CollectionViewSource for null ItemsSource)
- Eliminates the need for defensive null guards in
CreateCollectionViewSource()andGroupableItemsViewHandler - The
default: RealizeEmptyViewTemplate(emptyView, null)fallback in the PR'sUpdateEmptyView()passesnullas the template — this is a minor regression compared to the originalElement.EmptyViewTemplatereference; the alternative avoids this issue entirely by handling template-first - Simpler to reason about: fix is exactly at the two independent root causes
Test coverage: Three screenshot tests on Windows cover the three scenarios (EmptyView display, EmptyViewTemplate display, re-add ItemsSource). Tests are well-structured. Minor note: tests use [Order] attributes which creates inter-test state dependency — ideally each test would be fully independent, but this is a minor concern.
Requested change: Replace the PR's broader refactor with the targeted Candidate #1 fix:
- Revert
GroupableItemsViewHandler.Windows.csto original (remove theitemsSource is not nullguard added there) - In
ItemsViewHandler.Windows.cs, restore the original early return inUpdateItemsSource()but addUpdateEmptyViewVisibility()before it - In
ItemsViewHandler.Windows.cs, restoreCreateCollectionViewSource()to original (remove theitemsSource is not nullguard) - In
UpdateEmptyView(), keep the template-priority logic but use the approach from Candidate [Draft] Readme WIP #1 (widen the guard + template-first block)
kubaflo
left a comment
There was a problem hiding this comment.
Could you please review the AI's summary?
🚦 Gate - Test Before and After Fix📊 Expand Full Gate —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue28334 Issue28334 |
✅ FAIL — 573s | ✅ PASS — 461s |
🔴 Without fix — 🖥️ Issue28334: FAIL ✅ · 573s
Determining projects to restore...
Restored D:\a\1\s\src\Graphics\src\Graphics\Graphics.csproj (in 23.4 sec).
Restored D:\a\1\s\src\Graphics\src\Graphics.Win2D\Graphics.Win2D.csproj (in 23.49 sec).
Restored D:\a\1\s\src\Essentials\src\Essentials.csproj (in 11.65 sec).
Restored D:\a\1\s\src\Core\src\Core.csproj (in 20.18 sec).
Restored D:\a\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj (in 8.33 sec).
Restored D:\a\1\s\src\Core\maps\src\Maps.csproj (in 16.81 sec).
Restored D:\a\1\s\src\Controls\src\Core\Controls.Core.csproj (in 29 ms).
Restored D:\a\1\s\src\Controls\src\Xaml\Controls.Xaml.csproj (in 41 ms).
Restored D:\a\1\s\src\Controls\Maps\src\Controls.Maps.csproj (in 13 ms).
Restored D:\a\1\s\src\Controls\Foldable\src\Controls.Foldable.csproj (in 12 ms).
Restored D:\a\1\s\src\BlazorWebView\src\Maui\Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 29 ms).
3 of 14 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Essentials.dll
Graphics.Win2D -> D:\a\1\s\artifacts\bin\Graphics.Win2D\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Maps -> D:\a\1\s\artifacts\bin\Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Maps.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Foldable -> D:\a\1\s\artifacts\bin\Controls.Foldable\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Components.WebView.Maui\Debug\net10.0-windows10.0.19041.0\Microsoft.AspNetCore.Components.WebView.Maui.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Xaml -> D:\a\1\s\artifacts\bin\Controls.Xaml\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Xaml.dll
Controls.Maps -> D:\a\1\s\artifacts\bin\Controls.Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> D:\a\1\s\artifacts\bin\Controls.TestCases.HostApp\Debug\net10.0-windows10.0.19041.0\win-x64\Controls.TestCases.HostApp.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:05:50.58
Determining projects to restore...
Restored D:\a\1\s\src\TestUtils\src\VisualTestUtils\VisualTestUtils.csproj (in 878 ms).
Restored D:\a\1\s\src\TestUtils\src\UITest.NUnit\UITest.NUnit.csproj (in 1.95 sec).
Restored D:\a\1\s\src\TestUtils\src\UITest.Core\UITest.Core.csproj (in 3 ms).
Restored D:\a\1\s\src\TestUtils\src\VisualTestUtils.MagickNet\VisualTestUtils.MagickNet.csproj (in 4.56 sec).
Restored D:\a\1\s\src\TestUtils\src\UITest.Appium\UITest.Appium.csproj (in 1.78 sec).
Restored D:\a\1\s\src\TestUtils\src\UITest.Analyzers\UITest.Analyzers.csproj (in 12.17 sec).
Restored D:\a\1\s\src\Controls\tests\CustomAttributes\Controls.CustomAttributes.csproj (in 5 ms).
Restored D:\a\1\s\src\Controls\tests\TestCases.WinUI.Tests\Controls.TestCases.WinUI.Tests.csproj (in 11.9 sec).
7 of 15 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.CustomAttributes -> D:\a\1\s\artifacts\bin\Controls.CustomAttributes\Debug\net10.0\Controls.CustomAttributes.dll
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0\Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0\Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0\Microsoft.Maui.dll
Controls.Core.Design -> D:\a\1\s\artifacts\bin\Controls.Core.Design\Debug\net472\Microsoft.Maui.Controls.DesignTools.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0\Microsoft.Maui.Controls.dll
UITest.Core -> D:\a\1\s\artifacts\bin\UITest.Core\Debug\net10.0\UITest.Core.dll
VisualTestUtils -> D:\a\1\s\artifacts\bin\VisualTestUtils\Debug\netstandard2.0\VisualTestUtils.dll
UITest.NUnit -> D:\a\1\s\artifacts\bin\UITest.NUnit\Debug\net10.0\UITest.NUnit.dll
UITest.Appium -> D:\a\1\s\artifacts\bin\UITest.Appium\Debug\net10.0\UITest.Appium.dll
VisualTestUtils.MagickNet -> D:\a\1\s\artifacts\bin\VisualTestUtils.MagickNet\Debug\netstandard2.0\VisualTestUtils.MagickNet.dll
UITest.Analyzers -> D:\a\1\s\artifacts\bin\UITest.Analyzers\Debug\netstandard2.0\UITest.Analyzers.dll
Controls.TestCases.WinUI.Tests -> D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
Test run for D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit3TestExecutor discovered 3 of 3 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 3/29/2026 11:05:48 PM FixtureSetup for Issue28334(Windows)
>>>>> 3/29/2026 11:05:58 PM EmptyViewShouldRenderProperly Start
>>>>> 3/29/2026 11:06:01 PM EmptyViewShouldRenderProperly Stop
>>>>> 3/29/2026 11:06:01 PM Log types:
Failed EmptyViewShouldRenderProperly [4 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: EmptyViewShouldRenderProperly.png (0.82% 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
Stack Trace:
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue28334.EmptyViewShouldRenderProperly() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28334.cs:line 19
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/29/2026 11:06:02 PM EmptyViewTemplateShouldRenderProperly Start
>>>>> 3/29/2026 11:06:04 PM EmptyViewTemplateShouldRenderProperly Stop
>>>>> 3/29/2026 11:06:04 PM Log types:
Failed EmptyViewTemplateShouldRenderProperly [2 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: EmptyViewTemplateShouldRenderProperly.png (1.22% 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
Stack Trace:
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue28334.EmptyViewTemplateShouldRenderProperly() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28334.cs:line 28
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/29/2026 11:06:04 PM ReAddItemSourceShouldRenderProperly Start
>>>>> 3/29/2026 11:06:05 PM ReAddItemSourceShouldRenderProperly Stop
Passed ReAddItemSourceShouldRenderProperly [955 ms]
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.11] Discovering: Controls.TestCases.WinUI.Tests
[xUnit.net 00:00:00.30] Discovered: Controls.TestCases.WinUI.Tests
Total tests: 3
Passed: 1
Failed: 2
Test Run Failed.
Total time: 39.4459 Seconds
🟢 With fix — 🖥️ Issue28334: PASS ✅ · 461s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Essentials.dll
Graphics.Win2D -> D:\a\1\s\artifacts\bin\Graphics.Win2D\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Foldable -> D:\a\1\s\artifacts\bin\Controls.Foldable\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Foldable.dll
Maps -> D:\a\1\s\artifacts\bin\Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Maps -> D:\a\1\s\artifacts\bin\Controls.Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Maps.dll
Microsoft.AspNetCore.Components.WebView.Maui -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Components.WebView.Maui\Debug\net10.0-windows10.0.19041.0\Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Xaml -> D:\a\1\s\artifacts\bin\Controls.Xaml\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Xaml.dll
Controls.TestCases.HostApp -> D:\a\1\s\artifacts\bin\Controls.TestCases.HostApp\Debug\net10.0-windows10.0.19041.0\win-x64\Controls.TestCases.HostApp.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:05:37.03
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0\Microsoft.Maui.Graphics.dll
Controls.CustomAttributes -> D:\a\1\s\artifacts\bin\Controls.CustomAttributes\Debug\net10.0\Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0\Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0\Microsoft.Maui.dll
Controls.Core.Design -> D:\a\1\s\artifacts\bin\Controls.Core.Design\Debug\net472\Microsoft.Maui.Controls.DesignTools.dll
Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13684401
Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0\Microsoft.Maui.Controls.dll
UITest.Core -> D:\a\1\s\artifacts\bin\UITest.Core\Debug\net10.0\UITest.Core.dll
UITest.Appium -> D:\a\1\s\artifacts\bin\UITest.Appium\Debug\net10.0\UITest.Appium.dll
VisualTestUtils -> D:\a\1\s\artifacts\bin\VisualTestUtils\Debug\netstandard2.0\VisualTestUtils.dll
UITest.NUnit -> D:\a\1\s\artifacts\bin\UITest.NUnit\Debug\net10.0\UITest.NUnit.dll
VisualTestUtils.MagickNet -> D:\a\1\s\artifacts\bin\VisualTestUtils.MagickNet\Debug\netstandard2.0\VisualTestUtils.MagickNet.dll
UITest.Analyzers -> D:\a\1\s\artifacts\bin\UITest.Analyzers\Debug\netstandard2.0\UITest.Analyzers.dll
Controls.TestCases.WinUI.Tests -> D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
Test run for D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit3TestExecutor discovered 3 of 3 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 3/29/2026 11:13:33 PM FixtureSetup for Issue28334(Windows)
>>>>> 3/29/2026 11:13:42 PM EmptyViewShouldRenderProperly Start
>>>>> 3/29/2026 11:13:44 PM EmptyViewShouldRenderProperly Stop
Passed EmptyViewShouldRenderProperly [2 s]
>>>>> 3/29/2026 11:13:44 PM EmptyViewTemplateShouldRenderProperly Start
>>>>> 3/29/2026 11:13:46 PM EmptyViewTemplateShouldRenderProperly Stop
>>>>> 3/29/2026 11:13:46 PM ReAddItemSourceShouldRenderProperly Start
Passed EmptyViewTemplateShouldRenderProperly [1 s]
>>>>> 3/29/2026 11:13:46 PM ReAddItemSourceShouldRenderProperly Stop
Passed ReAddItemSourceShouldRenderProperly [900 ms]
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.15] Discovering: Controls.TestCases.WinUI.Tests
[xUnit.net 00:00:00.34] Discovered: Controls.TestCases.WinUI.Tests
Test Run Successful.
Total tests: 3
Passed: 3
Total time: 29.9108 Seconds
📁 Fix files reverted (3 files)
eng/pipelines/ci-copilot.ymlsrc/Controls/src/Core/Handlers/Items/GroupableItemsViewHandler.Windows.cssrc/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs


Issue 1 : EmptyViewTemplate Not Displayed
Root Cause of the issue
EmptyViewTemplatewas not considered in theUpdateEmptyViewmethod, causing it to be ignored.Description of Change
EmptyViewTemplateis now correctly handled to ensure it is displayed when appropriate.Issue 2: EmptyView Not Displayed Properly When Selected First and Then ItemSource is Set to Null
Root Cause of the issue
UpdateItemsSourcemethod returns early, preventingEmptyViewfrom being updated.Description of Change
Issues Fixed
Fixes #28334
Tested the behaviour in the following platforms
Screenshot
EmptyViewandEmptyViewTemplateIssue.mp4
EmptyViewandEmptyViewTemplatefix.mp4