Skip to content

[automated] Merge branch 'net11.0' => 'release/11.0.1xx-rc1' - #38433

Closed
github-actions[bot] wants to merge 34 commits into
release/11.0.1xx-rc1from
merge/net11.0-to-release/11.0.1xx-rc1
Closed

github-actions[bot] wants to merge 34 commits into
release/11.0.1xx-rc1from
merge/net11.0-to-release/11.0.1xx-rc1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

I detected changes in the net11.0 branch which have not been merged yet to release/11.0.1xx-rc1. I'm a robot and am configured to help you automatically keep release/11.0.1xx-rc1 up to date, so I've opened this PR.

This PR merges commits made on net11.0 by the following committers:

  • StephaneDelcroix
  • dotnet-maestro[bot]
  • davidortinau
  • SubhikshaSf4851
  • simonrozsival
  • kubaflo
  • Vignesh-SF3580
  • Dhivya-SF4094
  • rmarinho
  • mattleibow
  • Shalini-Ashokan
  • praveenkumarkarunanithi
  • TamilarasanSF4853
  • jfversluis

Instructions for merging from UI

This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.

merge button instructions

If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.

Instructions for merging via command line

Run these commands to merge this pull request from the command line.

git fetch
git checkout net11.0
git pull --ff-only
git checkout release/11.0.1xx-rc1
git pull --ff-only
git merge --no-ff net11.0

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-rc1
or if you are using SSH
git push git@github.com:dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-rc1

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

Instructions for updating this pull request

Contributors to this repo have permission update this pull request by pushing to the branch 'merge/net11.0-to-release/11.0.1xx-rc1'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote.

git fetch
git checkout -b merge/net11.0-to-release/11.0.1xx-rc1 origin/release/11.0.1xx-rc1
git pull https://github.com/dotnet/maui merge/net11.0-to-release/11.0.1xx-rc1
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-rc1
or if you are using SSH
git fetch
git checkout -b merge/net11.0-to-release/11.0.1xx-rc1 origin/release/11.0.1xx-rc1
git pull git@github.com:dotnet/maui merge/net11.0-to-release/11.0.1xx-rc1
(make changes)
git commit -m "Updated PR with my changes"
git push git@github.com:dotnet/maui HEAD:merge/net11.0-to-release/11.0.1xx-rc1

Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.

jfversluis and others added 30 commits September 2, 2026 16:00
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Clarifies the intentionally empty `IViewHandler.PlatformArrange`
implementations in the legacy Android and iOS `ShellRenderer` classes
and removes their stale speculative TODOs.

`IPlatformViewHandler` inherits `IViewHandler`, so both compatibility
renderers must implement `PlatformArrange`. They intentionally do no
work because native layout is already owned elsewhere: Android arranges
the flyout root from `OnElementSizeChanged`, while iOS uses the view
controller hierarchy and `ViewDidLayoutSubviews`.

No layout behavior changes.

## Validation

- `Controls.Core.csproj` builds for `net11.0-android37.0`
- `Controls.Core.csproj` builds for `net11.0-ios26.5`

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks the shipped iOS and Mac Catalyst
`ImageViewExtensions.UpdateSource` and `UpdateSourceAsync` methods
obsolete without removing or changing their behavior.

The synchronous helper is only a two-step convenience API; callers can
set `UIImageView.Image` directly and call
`UpdateIsAnimationPlaying(IImageSourcePart)`. For asynchronous loading,
the supported public extension point is
`ImageSourcePartLoader.UpdateImageSourceAsync()` with an
`IImageSourcePartSetter`, which is the same abstraction used by current
MAUI image, image button, button, and swipe-item handlers.

Repository history shows these helpers have had no internal callers
since the image-loading pipeline moved to `ImageSourcePartLoader`.
Public GitHub code search found no third-party calls to the
`UIImageView.UpdateSourceAsync` overload outside MAUI source forks. The
stale TODOs are removed as resolved.

### API review

This is warning-only obsoletion of two shipped platform APIs in .NET 11.
Their signatures remain in the iOS and Mac Catalyst shipped API
baselines; `ObsoleteAttribute` metadata is not represented separately by
the repository PublicAPI text format, so no baseline entries change. The
replacement guidance names public, documented APIs and does not strand
custom-handler consumers.

### Validation

- Targeted repository formatting completed.
- Local Apple compilation is unavailable because this Windows host has
.NET 10 Apple workloads while `net11.0` targets .NET 11 Apple TFMs; iOS
and Mac Catalyst CI are the platform validation gate.

### Issues Fixed

Candidate TODO cleanup 13; no GitHub issue.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Summary

- Remove the stale TODO suggesting the later input-transparency tests
may be duplicates.
- Preserve all existing test behavior because the later cases add
complementary coverage.

## Coverage comparison

The earlier tests exhaust the five Boolean cascade/input states for a
two-level `Grid` hierarchy with a `Button`, including property-order
permutations and one-property inversions. The later tests additionally
cover `Button`, `VerticalStackLayout`, `Editor`, and `Entry` children;
direct and three-level-deep nesting; repeated parent state transitions
back to the initial value; and nested cascade boundaries where parent
and nested layouts independently enable or disable cascading. Those
dimensions are not mechanically identical to the earlier matrix, so no
tests were consolidated or deleted.

## Validation

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates\src
--exclude-diagnostics CA1822 --include
src\Controls\tests\Core.UnitTests\VisualElementInputTransparentTests.cs
--verbosity quiet`
- `eng\common\dotnet.cmd test
src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj
--filter
"FullyQualifiedName~Microsoft.Maui.Controls.Core.UnitTests.VisualElementInputTransparentTests"
-p:IncludeAndroidTargetFrameworks=false
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false
-p:IncludeWindowsTargetFrameworks=false
-p:IncludeMacOSTargetFrameworks=false
-p:IncludeTizenTargetFrameworks=false --verbosity minimal` (372 passed)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause

`ControlsModalWrapper` checked whether
`UIModalPresentationStyle.Automatic` was available only after
`ToPlatformModalPresentationStyle` had already evaluated that iOS 13+
UIKit enum value.

### Description of Change

Moves the availability check into `ToPlatformModalPresentationStyle`,
which is the boundary that accesses the platform enum. Older iOS/tvOS
versions continue to use `FullScreen`; supported iOS, Mac Catalyst, and
tvOS versions use `Automatic`. The now-redundant caller fallback and
stale CA1416 suppression/TODO are removed.

### Testing

- `git diff --check`
- Confirmed the changed converter compiles with the installed .NET 10
iOS workload until unrelated net11-on-net10 API incompatibilities in
`ShellPageRendererTracker.cs`
- Authoritative net11.0 iOS and Mac Catalyst compilation will be
provided by PR CI because this Windows host does not have the
repository's required .NET 11 RC SDK or a Mac runtime

No test was added: reliably exercising the pre-iOS-13 branch requires an
old Apple runtime or an injected OS-version seam, which would broaden
this focused platform fix.

### Issues Fixed

N/A - candidate TODO cleanup #9.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Summary

- Documents both public iOS/Mac Catalyst `GetWindow` extension
overloads.
- Describes their parameters, return values, and null behavior.

## Testing

- `dotnet build src\Core\src\Core.csproj -f net11.0-ios26.5
--no-restore`
- `dotnet build src\Core\src\Core.csproj -f net11.0-maccatalyst26.5
--no-restore`
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Obsoletes the shipped iOS and Mac Catalyst
`NavigationRenderer.DidRotate` override ahead of its planned removal in
.NET 12.

UIKit deprecated `DidRotate` in iOS 8 and does not invoke it on MAUI's
supported iOS versions. The warning directs third-party subclasses to:

- `ViewWillTransitionToSize` for size-transition work.
- `ViewDidLayoutSubviews` for final layout updates.

A narrowly scoped `CS0809` suppression is required because the .NET
UIKit binding represents this as platform obsoletion rather than C#
`[Obsolete]`. No PublicAPI or compatibility analyzer is suppressed, and
the shipped method signature remains unchanged.

### Compatibility

Existing subclasses that override `DidRotate` or call `base.DidRotate`
continue to compile and run, with the intended `CS0618` migration
warning.

### Validation

- Built `Controls.Core` for `net11.0-ios26.5`.
- Built `Controls.Core` for `net11.0-maccatalyst26.5`.
- Compiled a temporary compatibility probe overriding `DidRotate` and
calling `base.DidRotate` for both platforms.
- Verified `Issue32722.TitleViewExpandsOnRotation` on an iPadOS 26.5
simulator.
- Verified
`Issue28986_NavigationPage.ToolbarExtendsAllTheWayLeftAndRight_NavigationPage`
on an iPhone 11 Pro iOS 26.5 simulator.

### Issues Fixed

N/A

Copilot-Session: 5ca03455-ae14-4b03-aeef-336f856d422e
…for DragOver (#38095)

This PR addresses flaky UI test failures in CI and includes updates to
improve rendering and test stability across platforms. The main changes
are as follows:

DragEvents: The test fails because the drag-and-drop operation sometimes
stops midway, causing the assertion validations to fail. Therefore, a
retry was added to ensure that the drag-and-drop operation completes
successfully.

**Fixes:** #37561
… both PhoneFlyoutPageRenderer and FlyoutViewHandler (#37894)

> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

#### Problem

`FlyoutPage` was migrated from the renderer to the handler architecture
on iOS/MacCatalyst (#36676). Despite that migration, every
existing `FlyoutPage` device test — and every other device test that
embeds a `FlyoutPage` as a supporting page (Modal, Window,
NavigationPage, Toolbar, Memory) — still hardcoded
`PhoneFlyoutPageRenderer` on iOS/MacCatalyst. As a result, the new
`FlyoutViewHandler` code path had zero device test coverage, even though
it's now the code path real apps run against.

#### Approach

Rather than write a parallel/duplicate set of tests for
`FlyoutViewHandler`, this PR makes the handler registration for
`FlyoutPage` overridable and reuses every existing test body across both
variants — the same pattern already used for the Android
Shell/Modal/Window renderer/handler axis.

For each affected test class:

- `SetupBuilder` (or equivalent) is made `virtual`.
- The `FlyoutPage` handler registration is extracted into a new virtual
`RegisterFlyoutPageHandler(...)` hook, defaulting to the existing
`PhoneFlyoutPageRenderer` registration on iOS/MacCatalyst (no behavior
change for the base class).
- A new `*_FlyoutViewHandler`/`FlyoutPageHandlerTests` subclass (new
`.iOS.cs` file) overrides that hook to register the real
`FlyoutViewHandler` instead, inheriting every `[Fact]`/`[Theory]`
unchanged — so the *same* test bodies run twice, once per variant.
- `FlyoutPageTests.iOS.cs`'s `FindPlatformFlyoutView` helper is made
virtual, so the handler subclass can locate
`FlyoutContainerViewController` (the real handler's `UIViewController`)
instead of `PhoneFlyoutPageRenderer`.

`xUnitCustomizations.GetReuseVariantPrefix()` was extended with a new
`FlyoutViewVariant` trait so each test's `DisplayName` is tagged
`[PhoneFlyoutPageRenderer]` / `[FlyoutViewHandler]`, mirroring the
existing Android `[Renderer]` / `[Handler]` convention, so results stay
distinguishable in test output.

Also fixes `NavigationPageTests` to register `PhoneFlyoutPageRenderer`
by default on iOS/MacCatalyst (it previously hardcoded
`FlyoutViewHandler` unconditionally), matching the default used by every
other affected test class.

#### Files changed

| File | Change |
|---|---|
| `RendererHandlerVariant.cs` | New `FlyoutViewVariant` trait constants
(`PhoneFlyoutPageRenderer` / `FlyoutViewHandler`) |
| `xUnitCustomizations.cs` | `GetReuseVariantPrefix()` now also checks
the new `FlyoutViewVariant` trait |
| `FlyoutPageTests.cs` / `.iOS.cs` | Virtual `RegisterFlyoutPageHandler`
hook; virtual `FindPlatformFlyoutView`; test bodies switched to
`CreateHandlerAndAddToWindow<IElementHandler>` so they work under either
variant |
| `ModalTests.cs`, `ToolbarTests.cs`, `WindowTests.cs`,
`MemoryTests.cs`, `NavigationPageTests.cs` | Same virtual hook pattern
applied wherever a `FlyoutPage` is embedded as a supporting page |
| `ControlsPageTypesTestCases.cs` | Routes through the new
handler-registration hook |
| 6 new `*_FlyoutViewHandler`/`*.FlyoutViewHandler.iOS.cs` files
(`FlyoutPageHandlerTests`, `ModalTests.FlyoutViewHandler`,
`ToolbarTests.FlyoutViewHandler`, `WindowTests.FlyoutViewHandler`,
`MemoryTests.FlyoutViewHandler`,
`NavigationPageTests.FlyoutViewHandler`) | One handler-variant subclass
per affected test class |

No existing test logic was duplicated or rewritten — only the
handler-registration hook was made overridable.
…7882)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

This test case was introduced in PR
[#36657](#36657), and it failed
during the PR’s CI run.

### Root Cause
The test paused the first `MauiApp.Build()` while resolving
`EssentialsCleanup`. However, cleanup is now resolved before the first
app's geocoder is assigned to `Geocoding.Default`.

Consequently, the test checked `Geocoding.Default` too early and failed
consistently. The failure was caused by the test's assumption about
initialization order, not by incorrect map-token ownership in the
production code.

### Description of Change
The test now pauses when the map-service token is being assigned to the
first app's geocoder. At this point, the geocoder has already been
assigned to `Geocoding.Default`.

This directly synchronizes on the behavior under test and follows the
callback-based approach already used by a neighboring map-token
concurrency
[test](https://github.com/dotnet/maui/blob/ec79089f659b4964710d59d4dc4a4e5fb59c7091/src/Core/tests/DeviceTests/Services/EssentialsDIBridgeTests.Windows.cs#L358).

The obsolete `EssentialsCleanup` synchronization helper was also removed
because it was used only by this test.

### Test case
Device Test
ConcurrentBuildAppliesMapServiceTokenToOwningGeocoder 

### Snapshot

| Before | After |
|---|---|
| <img width="1958" height="984" alt="image"
src="https://github.com/user-attachments/assets/111799b5-1d56-48a8-8dfe-3d9f0f603b5a"
/> | <img width="1958" height="984" alt="After"
src="https://github.com/user-attachments/assets/eb1039dc-7102-447f-9910-699abcdb2851"
/> |
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks the public APIs belonging exclusively to the legacy
CollectionView/CarouselView handler implementations as obsolete on
platforms where Items2 supersedes them. The attributes remain normal
compiler warnings, identify the affected platform, and provide Items2
migration guidance. Runtime handler registration and feature-switch
behavior are unchanged.

General iOS and Mac Catalyst device-test coverage now uses Items2,
matching the default runtime path. Explicit CV1 compatibility tests and
CI lanes remain in place during the obsolescence period.

The sample-content template no longer configures the obsolete Windows V1
`CollectionViewHandler`. That accessibility workaround targeted
`ListViewBase.SingleSelectionFollowsFocus`; the default CollectionView2
handler uses WinUI `ItemsView`, so the V1 mapper was both obsolete and
ineffective for generated .NET 11 projects.

This PR also corrects the handler-detection guidance, which still said
Items2 was iOS-only even though .NET 11 includes a Windows
CollectionView2 implementation.

## How the API boundary was determined

The `Handlers/Items` directory cannot be treated as uniformly legacy. I
classified types using two pieces of implementation evidence:

1. **Default handler registration** in
`AppHostBuilderExtensions.AddControlsHandlers` identifies which stack is
active for each platform and control.
2. **Cross-stack references from Items2 into Items** identify source,
native-view, and helper types that remain active dependencies rather
than legacy APIs.

That produced this platform matrix:

| Platform | CollectionView | CarouselView | Items status |
| --- | --- | --- | --- |
| iOS / Mac Catalyst | Items2 | Items2 | Legacy handlers are superseded;
shared source/helpers remain active |
| Windows | Items2 by default; Items fallback behind
`IsWindowsCollectionView2HandlerEnabled` | Items | Only the
CollectionView-specific Items hierarchy is superseded |
| Android | Items | Items | Active; no Items2 implementation |
| Tizen | Items | Items | Active; no Items2 implementation |

## APIs made obsolete

### iOS and Mac Catalyst: 27 public types

- Handler hierarchy: `ItemsViewHandler<TItemsView>`,
`StructuredItemsViewHandler<TItemsView>`,
`SelectableItemsViewHandler<TItemsView>`,
`GroupableItemsViewHandler<TItemsView>`,
`ReorderableItemsViewHandler<TItemsView>`, `CollectionViewHandler`, and
`CarouselViewHandler`.
- Controllers: `ItemsViewController<TItemsView>`,
`StructuredItemsViewController<TItemsView>`,
`SelectableItemsViewController<TItemsView>`,
`GroupableItemsViewController<TItemsView>`,
`ReorderableItemsViewController<TItemsView>`, and
`CarouselViewController`.
- Delegators: `ItemsViewDelegator<TItemsView, TViewController>`,
`SelectableItemsViewDelegator<TItemsView, TViewController>`,
`GroupableItemsViewDelegator<TItemsView, TViewController>`,
`ReorderableItemsViewDelegator<TItemsView, TViewController>`, and
`CarouselViewDelegator`.
- Cells/event data: `ItemsViewCell`, `DefaultCell`, `TemplatedCell`,
`CarouselTemplatedCell`, and `LayoutAttributesChangedEventArgs`.
- Legacy flow layouts: `ItemsViewLayout`, `ListViewLayout`,
`GridViewLayout`, and `CarouselViewLayout`.

### Windows: 5 public types

- `CollectionViewHandler`.
- The CollectionView-only `StructuredItemsViewHandler<TItemsView>`,
`SelectableItemsViewHandler<TItemsView>`,
`GroupableItemsViewHandler<TItemsView>`, and
`ReorderableItemsViewHandler<TItemsView>` hierarchy.

The attributes are placed on platform-specific partial declarations.
This avoids producing incorrect warnings for the same Items handler
symbols on Android, Tizen, or framework-neutral targets.

## APIs deliberately kept active

- All Android and Tizen Items APIs.
- Windows `ItemsViewHandler<TItemsView>` and `CarouselViewHandler`,
because CarouselView still depends on them.
- The controls and models themselves (`CollectionView`, `CarouselView`,
`ItemsView`, item layouts, and related control APIs).
- iOS/Mac Catalyst Items APIs reused by Items2: `IItemsViewSource`,
`IObservableItemsViewSource`, `ILoopItemsViewSource`,
`MauiCollectionView`, `IndexPathHelpers`, and
`ScrollToPositionExtensions`.
- Internal source factories/implementations plus template, index-path,
snap, scroll-tracking, and reorder helpers that Items2 still calls.

## Comparison with #37990

After the initial implementation, I compared this PR with #37990 and
adopted two useful patterns:

- obsolete messages now explicitly name iOS/Mac Catalyst or Windows,
because the same Items symbols remain active on other target frameworks;
- general iOS/Mac Catalyst device tests now select
`CollectionViewHandler2`/`CarouselViewHandler2`, and the CV1-only
duplicate of the reset/animation test was removed.

I intentionally did not copy #37990 wholesale:

- #37990 leaves Windows CV1 non-obsolete, while this PR follows the
requested .NET 11 scope and obsoletes only the Windows
CollectionView-specific fallback hierarchy; Windows CarouselView remains
active.
- #37990 removes the Apple CV1 UI-test stages, host controls, snapshots,
and CV1-only device tests. This PR retains explicit compatibility
coverage because `[Obsolete]` warns before removal but the
implementation and feature-switch paths still work.
- #37990 removes several `IndexPathHelpers`/item-source tests along with
other V1 tests. Those APIs remain shared dependencies used by Items2, so
their coverage stays here.

## Migration messages and internal compilation

Where Items2 exposes a public one-to-one replacement, the obsolete
message names it directly. Legacy layout and cell extension points
without a public one-to-one V2 type instead point developers to the
Items2 handler/`UICollectionViewLayout` pattern.

The legacy implementation necessarily references its own newly obsolete
public bases. Those internal inheritance declarations have narrowly
scoped `CS0618` suppressions. The same narrow treatment is used for:

- the intentional Windows feature-switch fallback;
- tests that explicitly exercise CV1 compatibility;
- the UI test host's `CollectionView1`/`CarouselView1` configurations.

Consumer uses remain unsuppressed and receive the migration warnings.

## Validation

Succeeded locally:

- `dotnet build Microsoft.Maui.BuildTasks.slnf -v:minimal`
- `dotnet build src/Controls/src/Core/Controls.Core.csproj -f
net11.0-ios26.5 --no-restore -v:minimal`
- `dotnet build src/Controls/src/Core/Controls.Core.csproj -f
net11.0-maccatalyst26.5 --no-restore -v:minimal`
- `dotnet build src/Controls/src/Core/Controls.Core.csproj -f
net11.0-android37.0 --no-restore -v:minimal`
- `dotnet build
src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj -f
net11.0-ios -warnaserror:CS0618 -v:minimal`
- `dotnet build
src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj -f
net11.0-maccatalyst --no-restore -warnaserror:CS0618 -v:minimal`
- `dotnet build
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-f net11.0-ios -v:minimal`
- `dotnet build
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-f net11.0-maccatalyst -v:minimal`
- `dotnet build src/Templates/src/Microsoft.Maui.Templates.csproj
--restore --verbosity:minimal`

The Windows cross-build was attempted from macOS. Restore succeeded, but
native Windows SDK tools (`MakePri.exe` and `XamlCompiler.exe`) cannot
execute on this host. Windows CI therefore remains the authoritative
compile validation for the platform-specific attribute declarations,
fallback suppression, and generated sample-content project.

No PublicAPI file changes were required by the analyzers during the
Apple platform builds.

### Issues Fixed

N/A - this is an API lifecycle change for the .NET 11 handler
transition, not a fix for a tracked bug.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Copilot-Session: 34119751-9163-4360-b85e-bc7f1d6e1701
Copilot-Session: 020699c2-68a0-498c-94ae-b4238a1886f0
…tionPage toolbars  (#38058)

<!-- Please let the below note in for people that find this PR -->
   > [!NOTE]
   > Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
  Thank you!

### Root Cause
On Android, the native `AppBarLayout` retains the top inset padding
applied while the toolbar is visible. When navigating to a page with the
navigation bar hidden, setting the toolbar height to zero does not clear
this stale padding, preventing the `AppBarLayout` from collapsing
completely and resulting in incorrect content bounds.

Clearing the stale padding triggers an asynchronous AppBar/content
relayout. If insets are recalculated immediately, the calculation can
use the content's pre-relayout position and apply incorrect safe-area
padding. Once the relayout completes, the content can move under the
status bar without another inset dispatch. This affects both Shell and
NavigationPage during visible-to-hidden toolbar transitions.

### Description of Change

When hiding the Android toolbar, the stale padding on the enclosing
`AppBarLayout` is cleared so that it can collapse completely. Inset
recalculation is then deferred using `View.Post`, allowing the AppBar
and content layout to settle before insets are redispatched. A guard
ensures that the deferred callback only runs while the native toolbar
remains attached and the virtual toolbar is still hidden, preventing a
stale queued callback from applying insets after a rapid hide-to-show
transition.

The fix is implemented in the shared Android
`ToolbarExtensions.UpdateIsVisible` path, providing consistent behavior
for both Shell and NavigationPage without requiring public API changes.

### Issues Fixed
Fixes #38148
 
Tested the behaviour in the following platforms
- [x] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

### Regression Details:
Regressed by PR #34758 , which replaced Android Shell’s legacy renderers
with the new handler-based architecture on  net11.0 .

### Output Video
Before Issue Fix | After Issue Fix |
|----------|----------|
|<img width="300" alt="Before Fix"
src="https://github.com/user-attachments/assets/b3096fa1-c4db-4b7a-806c-870432adb3b4">|<img
width="300" alt="After Fix"
src="https://github.com/user-attachments/assets/3a9ce5f4-78e1-4999-87c9-f86aa8e12911">|
…38117)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->


### Issue Details
On Windows, CollectionView.ScrollTo(..., ScrollToPosition.MakeVisible)
incorrectly positions the target item at the top of the CollectionView
instead of scrolling only as much as necessary to make the item visible.

### Root Cause
The CV2 Windows handler initializes MakeVisible with alignment 0.0,
which WinUI interprets as top alignment.
Because there is no explicit MakeVisible case, it behaves like Start and
moves the target item to the top.

### Description of Change
Initialize the alignment with double.NaN, which tells WinUI not to force
a specific position.
WinUI then scrolls only enough to reveal the item, matching the expected
behavior and the older CV1 handler.

Validated the behavior in the following platforms
 
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac
 
### Issues Fixed
  
Fixes #38057 

### Output  ScreenShot

|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/dfacb4a1-e50d-4a9c-8e43-f30a77327eee"
>| <video
src="https://github.com/user-attachments/assets/a5be0176-16c9-40b9-bea4-db6eec49fafb">|
…both TabbedRenderer and TabbedViewHandler (#37803)

> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

#### Problem

`TabbedPage` was migrated from the renderer to the handler architecture
on iOS/MacCatalyst (#36507). Despite that migration, every existing
`TabbedPage` device test — and every other device test that embeds a
`TabbedPage` as a supporting page — still hardcoded `TabbedRenderer` on
iOS/MacCatalyst. As a result, the new `TabbedViewHandler` code path had
**zero device test coverage**, even though it's now the code path real
apps run against.

#### Approach

Rather than write a parallel/duplicate set of tests for
`TabbedViewHandler`, this PR makes the handler registration for
`TabbedPage` overridable and reuses every existing test body across both
variants — the same pattern already used for the Android
Shell/Modal/Window renderer/handler axis.

For each affected test class:

- `SetupBuilder` (or equivalent) is made `virtual`.
- The `TabbedPage` handler registration is extracted into a new virtual
`RegisterTabbedPageHandler(...)` hook, defaulting to the existing
`TabbedRenderer` registration on iOS/MacCatalyst (no behavior change for
the base class).
- A new `*_TabbedViewHandler` subclass (new `.iOS.cs` file) overrides
that hook to register the real `TabbedViewHandler` instead, inheriting
every `[Fact]`/`[Theory]` unchanged — so the *same* test bodies run
twice, once per variant.

`xUnitCustomizations.GetReuseVariantPrefix()` was extended to run on
iOS/MacCatalyst and tag each test's `DisplayName` with
`[TabbedRenderer]` / `[TabbedViewHandler]`, mirroring the existing
Android `[Renderer]` / `[Handler]` convention, so results stay
distinguishable in test output.

#### Files changed

| File | Change |
|---|---|
| `RendererHandlerVariant.cs` | New `TabbedViewVariant` trait constants
(`TabbedRenderer` / `TabbedViewHandler`) |
| `xUnitCustomizations.cs` | `GetReuseVariantPrefix()` now also runs on
iOS/MacCatalyst |
| `TabbedPageTests.cs` / `.iOS.cs` | Virtual `RegisterTabbedPageHandler`
hook; fixed 3 `Handler_*` tests and 2 `CreateHandlerAndAddToWindow<T>`
call sites that hardcoded a concrete handler type |
| `ModalTests.cs`, `WindowTests.cs`, `NavigationPageTests.cs`,
`ToolbarTests.cs`, `MemoryTests.cs` | Same virtual hook pattern;
`ModalTests`/`WindowTests` keep their existing Android `Variant` trait
alongside the new one |
| `ControlsPageTypesTestCases.cs` | New optional `useTabbedViewHandler`
parameter (static `ClassData` helper, can't be subclassed) |
| `EntryTests.iOS.cs` | `EntryTestsWithWindow` routes through a new
`RegisterPageTypeHandlers` hook |
| 6 new `*_TabbedViewHandler`/`*.TabbedViewHandler.iOS.cs` files | One
handler-variant subclass per affected test class |

No existing test logic was duplicated or rewritten — only the
handler-registration hook was made overridable.
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Summary

Synchronizes the complete external dependency graph from
`release/11.0.1xx-rc1` at `4524eb46412e8290017c21d2bf211eb10aaf13b1`
into `net11.0`.

The RC1 SDK `11.0.100-rc.1.26420.103` no longer supplies a trailing
directory separator in `MSBuildExtensionsPath`. This PR therefore also
ports the workload-path compatibility fix already shipping on
`release/11.0.1xx-rc1`: normalize the property with
`EnsureTrailingSlash` before composing the workload manifest and
`dotnet` host paths. The fix is inseparable from using RC1's SDK
dependency graph on `net11.0`; without it, every integration leg fails
while installing local workloads.

Repeated clean CI runs also exposed existing Resizetizer
test-infrastructure races. The separate test commits extend the bounded
Windows directory-deletion retry window with linear backoff (#37967) and
serialize MSBuild event-list writes used by parallel async tasks.
Product behavior is unchanged, cleanup exceptions still escape after
retry exhaustion, and test failures remain visible.

Windows integration testing additionally exposed unreliable stdout
capture for fast MSBuild property evaluation. The workload-path
regression test now requests all four evaluated properties in one
MSBuild invocation per path variant and reads them from unique JSON
files produced by `-getResultOutputFile`, avoiding dependence on
redirected stdout while preserving the shared runner's bounded process
behavior.

## Changes

- Copies all dependency entries and metadata in
`eng/Version.Details.xml` from RC1.
- Synchronizes the corresponding dependency properties in
`eng/Versions.props`.
- Copies the RC1 dependency/tool/MSBuild SDK pins in `global.json`.
- Normalizes `MSBuildExtensionsPath` before resolving workload
installation paths.
- Adds regression coverage for paths both with and without a trailing
separator, using the repo-local installed SDK directory so the test is
valid on Windows and macOS.
- Captures workload path properties through MSBuild JSON result files
without extending shared `ToolRunner` process waits.
- Hardens Resizetizer test cleanup against transient Windows image-file
locks with bounded retries and linear backoff (#37967).
- Serializes Resizetizer test-fixture event collection for parallel
async task logging.
- Leaves `NuGet.config` unchanged because it is identical between the
source and target refs.

The `net11.0` product-version settings remain branch-specific:
`PreReleaseVersionLabel=preview` and `PreReleaseVersionIteration=7`.
These are the only remaining `eng/Versions.props` differences from RC1
(`rc` / `1` respectively).

## Validation

- Parsed dependency comparison: 52 entries on each branch, no
source-only or target-only entries, and zero metadata mismatches.
- `global.json` matches RC1 exactly.
- `eng/Versions.props` matches RC1 except for the two intentional
product-version settings above.
- `dotnet restore Microsoft.Maui.BuildTasks.slnf --no-cache`
- `dotnet build Microsoft.Maui.BuildTasks.slnf --no-restore
--configuration Release`
- `pwsh
.github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1
-TestFilter 'FullyQualifiedName~DotNetProjectTests'
-SkipXcodeVersionCheck`
- `WorkloadInstallPathsAreIndependentOfTrailingSeparator` passed (1/1
total), including result-file existence and non-empty values for all
four evaluated properties.
- `pwsh
.github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1
-TestFilter
'FullyQualifiedName~MultiProjectTemplateTest.NewSolutionIncludesGitIgnore'
-SkipBuild -SkipInstall -SkipXcodeVersionCheck`
- Passed (1/1 total), confirming a representative template child-process
invocation completes without hanging.
- Full integration workflow with build, pack, and RC1 local workload
installation succeeded.
- Focused `ResizetizeImagesTests` and `SkiaSharpRasterToolsTests` passed
three consecutive runs after each Resizetizer infrastructure fix
(369/369 each run); the command suppressed only pre-existing unrelated
`xUnit2031` analyzer diagnostics.
- `darc verify` was run; it reports existing repository metadata
diagnostics also present in the RC1 source (duplicate Tizen/XUnit
property aliases and the pre-existing XHarness CLI mismatch), none
introduced by this synchronization.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Fixes #37889.

Source-generated incremental Hot Reload rebuilds a binding when only
`StringFormat` changes. The update writer expands the binding in a
synthetic generator context that has no live XAML namescope, so nested
`{x:Reference ...}` resolution loses its source. The replacement binding
keeps its path and format but receives a null source, clearing the
target value.

This change recognizes the actual
`Microsoft.Maui.Controls.Xaml.ReferenceExtension` symbol while
regenerating markup extensions and resolves it from the live target
element's namescope. Resolution is performed before replacing the
existing property value: if the element is detached, namescopes are
disabled, or a renamed/new name has not yet been reconciled, the update
is skipped and the existing binding is retained rather than cleared or
throwing. Non-`Element` property owners use the root `Element` as the
namescope anchor when available.

The change intentionally does not duplicate the broad structural
namescope registration work in #37897. Child-list changes already run
before property changes, so once #37897 reconciles a structurally
introduced name, this guarded lookup can consume it; without that
reconciliation, it fails safely.

## Tests

Added source-generator Hot Reload coverage that:

- creates two live page instances and verifies a `StringFormat`-only
edit retains each instance's referenced source;
- detaches the updated element and removes its transient namescope,
proving the update does not throw or replace the existing binding;
- renames an `x:Name` without live namescope reconciliation, proving the
unresolved reference does not clear the existing source;
- defines a user markup extension named `ReferenceExtension`, proving it
is not mistaken for MAUI's `x:Reference`.

Baseline result for the original reproduction: failed with `Expected:
\"mirror Instance caption V1\"; Actual: null`.

Validation:

```text
Targeted: Passed 20, Failed 0, Skipped 0
Full SourceGen suite: Passed 515, Failed 0, Skipped 0
```

Commands:

```bash
DOTNET_MODIFIABLE_ASSEMBLIES=debug dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --no-restore --filter "FullyQualifiedName~BindingAndMarkupHotReloadTests|FullyQualifiedName~UpdateComponentCodeWriterTests"
DOTNET_MODIFIABLE_ASSEMBLIES=debug dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --no-restore
```

Formatting:

```bash
dotnet format src/Controls/src/SourceGen/Controls.SourceGen.csproj --no-restore --include src/Controls/src/SourceGen/UpdateComponentCodeWriter.cs --exclude-diagnostics CA1822
dotnet format src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --no-restore --include src/Controls/tests/SourceGen.UnitTests/HotReload/AiAssisted/BindingAndMarkupHotReloadTests.Bindings.cs src/Controls/tests/SourceGen.UnitTests/HotReload/AiAssisted/BindingAndMarkupHotReloadTests.cs --exclude-diagnostics CA1822
```

## Risk

Low and limited to source-generated incremental Hot Reload
markup-extension regeneration. Normal XAML inflation and runtime binding
behavior are unchanged. Template realization remains outside this
patch's scope; existing DataTemplate/ControlTemplate namescope isolation
behavior is unchanged.

---------

Copilot-Session: c30817d7-694e-4593-8efc-dc56ecfaeba1
<!-- Please let the below note in for people that find this PR -->
   > [!NOTE]
   > Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
  Thank you!

### Root Cause
The Windows `InfoBadge` color bindings used a converter that returned
`UnsetValue` for null colors. Because the binding remained attached to
the native property, WinUI’s default theme brush was not restored,
leaving the badge background null.

### Description of Change
Replaced the converter bindings with WinUI theme-resource fallbacks for
null background and foreground values. Removed the obsolete converter
and its implementation-specific test assertion. Custom colors continue
to override the defaults.

### Issues Fixed
Fixes #38198 

Tested the behaviour in the following platforms
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

This PR is stacked on #38049 and removes the remaining iOS/Mac Catalyst
CollectionView and CarouselView V1 test coverage. The Apple V1 handler
is obsolete, will receive no further fixes, and its dedicated test
coverage is flaky and time-consuming.

The change:

- removes the dedicated iOS CollectionView V1 and CarouselView V1
UI-test stages and filters;
- removes Apple `TEST_CONFIGURATION_ARGS=CollectionView1` handler
switching, `CollectionView1`/`CarouselView1` controls, and their
obsolete-warning suppressions;
- deletes the V1-only iOS cache device test and disabled legacy
`VerticalCell` leak test;
- migrates general CarouselView and CollectionView host fixtures to the
default Apple Items2 handlers;
- removes the Apple-only Issue 25433 V1 snapshot coverage while
preserving its Android Items test; and
- keeps Items types still consumed by Items2, including item-source,
index-path, template, snap, scroll, reorder, and `MauiCollectionView`
infrastructure.

### Coverage audit

| Removed Apple V1 coverage | Disposition | Replacement / rationale |
|---|---|---|
| Dedicated `ios_ui_tests_coreclr_cv1` CollectionView lane | **(a)
Equivalent Items2 test exists** | The normal iOS lane runs the same
`CollectionView` category with Items2. |
| Dedicated `ios_ui_tests_coreclr_carv1` CarouselView lane | **(a)
Equivalent Items2 test exists** | The normal iOS lane runs the same
`CarouselView` category with Items2. |
| Host `CollectionView1` / `CarouselView1` controls and environment
switch | **(a)/(b) Removed or migrated** | Dedicated V1 selection is
removed; explicit `CollectionView2` / `CarouselView2` fixtures remain. |
| `EnsureCellSizesAreCached` and its custom handler/controller/delegator
| **(c) V1 implementation-specific** | It introspected the legacy
flow-layout cache through `ReorderableItemsViewHandler`,
`ItemsViewController`, and `ItemsViewDelegator`. |
| Disabled `CellsDoNotLeak` device test | **(c) V1
implementation-specific** | It directly constructed the legacy
`VerticalCell`; current Apple handler/controller leak tests cover
Items2. |
| Carousel gallery next/previous and loop navigation tests | **(b)
Migrated to Items2 in this PR** | `CarouselViewCoreGalleryPage` now uses
standard `CarouselView`; these tests pass in the normal Apple lane. |
| `CarouselViewSetPosition` and
`CarouselViewKeepPositionChangingOrientation` | **(d) Apple Items2
coverage gap** | UI CI confirmed Items2 still reports position `0`
instead of `3` and loses the visible item after rotation. Android Items
coverage remains; Apple execution is excluded pending an Items2 fix. |
| `CarouselViewUpdateCurrentItem` host fixture | **(b)/(d) Migrated to
Items2; Apple execution needs follow-up** | The page now uses standard
`CarouselView`; Android Items coverage remains, while Apple execution is
excluded for open CV2 regression #29312. |
| Issue 25433 horizontal-grid spacing test and three Apple snapshots |
**(c) V1 implementation-specific** | Its fix (#25825) changed only
`Handlers/Items/iOS`. Android Items coverage and snapshots remain. |
| Issue 26066 CV1 comparison fixture | **(a) Equivalent Items2 test
exists** | `CollectionView2ShouldFindAncestorType` continues to validate
the Items2 scenario. |
| Issue 27711 dedicated-lane CV1 execution | **(a) Equivalent Items2
test exists** | The normal Apple lane continues
`RightToLeftFlowDirectionShouldWork` with Items2. |

Categories: **(a)** equivalent Items2 coverage, **(b)** migrated to
Items2 here, **(c)** V1 implementation-specific and intentionally
removed, **(d)** possible coverage gap.

### Needs follow-up investigation

- **(d) `CarouselViewUpdateCurrentItem.Issue9827Test`:** the host
fixture now targets Items2, but the Appium test is restricted to Android
while open CV2 regression #29312 is unresolved. Android Items coverage
remains; Apple coverage needs to be re-enabled when #29312 is fixed.
- **(d) `CarouselViewSetPosition` and
`CarouselViewKeepPositionChangingOrientation`:** the Items2 host
migration exposed failing Apple behavior in UI CI. Both remain enabled
for Android Items and are excluded on iOS/Mac Catalyst until the Items2
behavior is fixed.

### Windows CV1 preserved

- [x] `build_ui_tests_windows_cv1` and `winui_ui_tests_cv1` remain in
`eng/pipelines/common/ui-tests.yml`.
- [x] `useWindowsCV1`, `UseWindowsCV1:true`, and the
`ui-tests-samples-windows-cv1` artifact flow remain in the UI-test
templates.
- [x] `UITest.cs` still maps Windows CV1 runs to the `windows-cv1`
snapshot environment.
- [x] All 70 baselines under
`src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows-cv1/`
remain.
- [x] Windows CollectionView V1 device tests, handler aliases, and
feature-switch plumbing are unchanged.
- [x] No Windows or WinUI file is removed or modified by this PR.

### Validation

- Built `Controls.DeviceTests` for `net11.0-ios` and
`net11.0-maccatalyst` with `CS0618` treated as an error.
- Built `Controls.TestCases.HostApp` for `net11.0-ios` and
`net11.0-maccatalyst` with `CS0618` treated as an error.
- Built the iOS, Mac Catalyst, and Android Appium test projects with
`CS0618` treated as an error.
- Parsed `eng/pipelines/common/ui-tests.yml` successfully.
- Confirmed no Apple V1 handler fixture, selector, dedicated stage, or
legacy controller/cell reference remains in Apple test code.
- Confirmed shared Items helpers used by Items2 and all Windows CV1
selectors/snapshots remain.

### Issues Fixed

N/A

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
…sources (#38093)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Issue Details
Multiple DataTemplate resources can use x:Reference to access a named
element outside the template.
When these templates are generated as lazy resources, SourceGen
incorrectly reports that the name cannot be found.
This causes the build to fail with MAUIG1001.

### Root Cause
SourceGen walks upward through the XAML tree to find the requested name.
When an internal ListNode is encountered, the old code moves up once to
skip the list and then moves up again.
That second movement skips the real parent element that must be
searched.

### Description of Change
The new helper starts at the immediate parent and skips only internal
ListNode wrappers.
It returns the first real parent element instead of moving past it.
Both direct x:Reference and binding-source resolution now use this
corrected traversal.

Validated the behavior in the following platforms
 
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac
 
### Issues Fixed
  
Fixes #37551 

### Output  ScreenShot

|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/60ba519f-65f6-4893-a7d1-8bba23dc3cf1"
>| <video
src="https://github.com/user-attachments/assets/0b9deb16-a494-4182-801c-7ac8472d31a3">|
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Follows up on review feedback left after #38082 merged:

- clarifies that the test-only Items2 handler registrations apply only
to iOS and Mac Catalyst;
- renames the remaining Issue28716 scenario suffixes from `cv2`/`cv3` to
`view2`/`view3`, matching `view1` and avoiding obsolete-handler
terminology; and
- documents the platform-specific CarouselView exclusions, restoring
initial-position coverage on Mac Catalyst while retaining Android Items
coverage.

### Validation

- Built the iOS and Mac Catalyst HostApp targets with `CS0618` treated
as an error.
- Built the iOS, Mac Catalyst, and Android Appium test projects with
`CS0618` treated as an error.
- Parsed the updated Issue28716 XAML.
- Reviewed the complete delta against current `net11.0`; no additional
findings.

### Issues Fixed

Follow-up to #38082.

---------

Copilot-Session: 29d9114d-bd2d-408c-9c85-4ea11bf3c5a7
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Avoids redirecting `BackgroundColor`, `BackgroundImageSource`, and the
three semantics properties back through their canonical mapper entries
during initial handler connection. The canonical `Background` and
`Semantics` entries already read the current composite values in that
same initialization pass.

Reconnect and dynamic property-update behavior is unchanged.

## Benchmark

The local Sandbox harness is not included in this PR. Release iOS
simulator, iPhone 16 Pro / iOS 18.4:

| Fixed-work metric | `net11.0` base | This change | Difference |
|---|---:|---:|---:|
| Heavy tile `ToPlatform` (55 elements) | 11.597 ms | 10.621 ms |
**-8.4%** |
| Flat tile `ToPlatform` (14 elements) | 4.524 ms | 4.044 ms |
**-10.6%** |
| Mapper calls, 12 heavy tiles | 26,808 | 23,916 | **-2,892 (-10.8%)** |

The optimized run completed all 70 benchmark results with `run-end|ok`.

## Review

Independent GPT, Claude, and Gemini reviews traced initial connection,
reconnect, dynamic updates, mapper ordering, and semantics/background
composition. The change remains intentionally limited to initial
connection rather than changing reconnect semantics.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5a03e13d-1a41-4652-a8c6-099eeb79cd50
Copilot-Session: c30817d7-694e-4593-8efc-dc56ecfaeba1
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Re-enables template integration coverage for `DotNetPrevious`
(`net10.0`) on the `net11.0` branch.

- Restores previous-framework build, version-pinning, and core-library
pack cases for `maui`, `maui-blazor`, and `mauilib` templates.
- Restores packaged and unpackaged Windows publish cases, using the
portable `win-x64` output layout used by .NET 10 templates.
- Adds four independently filterable iOS tests for MAUI and Blazor
Debug/Release configurations.
- Adds matching ARM64 and x64 CI jobs so the four iOS configurations
execute in parallel with per-configuration failure reporting.
- Merges the current `net11.0` target branch and preserves its updated
CoreCLR/NativeAOT lane structure.

### Issues Fixed

N/A

---------

Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
Copilot-Session: c1f5684d-386d-4523-8d25-f0f81ad8cab1
#38270)

This pull request updates the following dependencies

[marker]: <> (Begin:abba2d18-eaa5-438c-b3c3-4d22ef33159d)
## From https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- **Subscription**:
[abba2d18-eaa5-438c-b3c3-4d22ef33159d](https://maestro.dot.net/subscriptions?search=abba2d18-eaa5-438c-b3c3-4d22ef33159d)
- **Build**:
[20260901.1](https://dev.azure.com/dnceng/internal/_build/results?buildId=3063355)
([329842](https://maestro.dot.net/channel/8297/azdo:dnceng:internal:dotnet-optimization/build/329842))
- **Date Produced**: September 1, 2026 8:16:43 PM UTC
- **Commit**:
[06b1cccfb6c69c37127d231ec8089f935f207c95](https://dev.azure.com/dnceng/internal/_git/dotnet-optimization?_a=history&version=GC06b1cccfb6c69c37127d231ec8089f935f207c95)
- **Branch**:
[refs/heads/main](https://dev.azure.com/dnceng/internal/_git/dotnet-optimization?version=GBrefs/heads/main)

[DependencyUpdate]: <> (Begin)

- **Dependency Updates**:
  - From [1.0.0-prerelease.26420.2 to 1.0.0-prerelease.26451.1][1]
     - optimization.android-x64.MIBC.Runtime

[1]:
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization/branches?baseVersion=GCeb2e9a7ebf54cdb4bc0ade04a042a23ee1568a6f&targetVersion=GC06b1cccfb6c69c37127d231ec8089f935f207c95&_a=files

[DependencyUpdate]: <> (End)


[marker]: <> (End:abba2d18-eaa5-438c-b3c3-4d22ef33159d)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…ld ignores Material 3 styling (#36907)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Detail

When Material 3 is enabled on Android, the DatePicker (and TimePicker)
still rendered with the Material 2 underline-style field instead of the
Material 3 outlined field.

### Description of Change

- Updates the Android Material 3 DatePicker and TimePicker to use an
outlined Material text field — a stroked, rounded border with a trailing
calendar/clock icon — instead of the previous underline-style
`TextInputEditText`.
- The picker dialog now opens **only** when the trailing icon is tapped,
aligning with Material 3 guidance. Tapping the text area does not open
the dialog.
- Both controls share a common base view that consolidates the outlined
border, read-only inner text field, and end-icon behavior.

**Shared base**

- Adds `MauiMaterialDateTimePickerBase`, a `TextInputLayout`-based view
(`MauiMaterialTextInputLayout`) that hosts a read-only inner
`MauiMaterialEditText` and a trailing end icon used to open the picker
dialog.
- Derived controls only supply the end-icon drawable and its
accessibility content description.

**DatePicker**

- `MauiMaterialDatePicker` derives from the shared base and uses the
calendar drawable with the "Open date picker" end-icon content
description.
- `DatePickerHandler2` routes date, format, text color, character
spacing, and font updates through `InputEditText`.
- The dialog is opened via the trailing end-icon tap.

**TimePicker**

- `MauiMaterialTimePicker` was migrated from the underline-style
`TextInputEditText` to the shared outlined base, using the clock
drawable with the "Open time picker" end-icon content description.
- `TimePickerHandler2` and `TimePickerExtensions` route updates through
`InputEditText`.

**Border:** `BoxBackgroundMode = BoxBackgroundOutline` is configured in
the shared base to render the rounded, stroked outline. Stroke color,
stroke width, and corner radii are inherited from the Material theme.

**Read-only field:** The inner edit text suppresses the keyboard and
cursor via `InputType = Null`, `KeyListener = null`, and
`SetCursorVisible(false)`, since the value is chosen through the picker
dialog rather than typed.

**Focus behavior:**
- The inner field is **non-focusable at rest** (`Focusable = false`,
`FocusableInTouchMode = false`) so it is never an initial-focus
candidate and does not render highlighted at load.
- While the dialog is open the field is temporarily made focusable
(`RequestInputFocus`) so the outline shows its focused stroke; on
dismiss focus is cleared **only if the field currently holds it**
(`ClearInputFocus`), avoiding stray focus/keyboard on other inputs.
- Focus round-trips through the handler: the inner edit text's
`FocusChange` is wired so `IsFocused` and the `Focused`/`Unfocused`
events fire, and `IView.Focus`/`Unfocus` are mapped to the inner edit
text.

**Trailing icon:** Hosted in the layout's end-icon slot via `EndIconMode
= EndIconCustom`, `SetEndIconDrawable`, `SetEndIconContentDescription`
(accessibility), and `SetEndIconOnClickListener`. The trailing icon is
the only interaction that opens the dialog.

**JNI activation:** The base and derived views include the `(nint,
JniHandleOwnership)` activation constructors so Android can reconstruct
the managed peers (e.g. rotation).

**API cleanup:** Removed the unused public
`MauiMaterialDatePicker`/`MauiMaterialTimePicker` extension forwarders
(`UpdateDate`/`UpdateFormat`/`UpdateTextColor`/`UpdateTime`); the
handlers call the internal `MauiMaterialEditText` overloads directly.
All affected entries were unshipped.

> **(.NET 11 preview, unshipped API):** On Android with Material 3
enabled, `DatePickerHandler2.PlatformView` /
`TimePickerHandler2.PlatformView` changed from a
`TextInputEditText`-derived view to a `TextInputLayout`-derived
`MauiMaterialDatePicker` / `MauiMaterialTimePicker` (new shared base
`MauiMaterialDateTimePickerBase`), and the `(Context, IAttributeSet)` /
`(Context, IAttributeSet, int)` constructors were removed. Code
customizing the picker through `PlatformView` (e.g. `PlatformView.Text`,
`PlatformView.SetTextColor`) should use `PlatformView.InputEditText`
instead.


### Validated the behaviour in the following platforms
- [x] Android
- [ ] Windows
- [ ] iOS
- [ ] Mac

### Issues Fixed:

Fixes #36729 

### Screenshots
| | Before  | After |
|--|---------|--------|
|Date and TimePicker field |  <img height=600 width=300
src="https://github.com/user-attachments/assets/71a7665c-04fe-4d92-9488-fc56f623f5f1">
|  <img height=600 width=300
src="https://github.com/user-attachments/assets/c48565fa-81b0-4b8e-bcae-f9aab0c09908"> 
|
|DatePicker|  <img height=600 width=300
src="https://github.com/user-attachments/assets/07ff92a5-0f4b-456c-a151-788049606904">
|  <img height=600 width=300
src="https://github.com/user-attachments/assets/81bd4952-6117-4c52-8d9a-723e39e8380d"> 
|
| TimePicker|  <img height=600 width=300
src="https://github.com/user-attachments/assets/b2da1704-64b0-4479-ac1b-088faa2ffcbe">
|  <img height=600 width=300
src="https://github.com/user-attachments/assets/657110a8-6b43-444c-9c7d-9af60faa6775"> 
|
…37034)

> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description of Change

Introduces a new handler-based implementation of `Shell` for iOS and Mac
Catalyst while retaining the compatibility `ShellRenderer` as the
default implementation.

The new implementation replaces the monolithic `ShellRenderer` (IS a
`UIViewController`), `ShellItemRenderer` (IS a `UITabBarController`),
and `ShellSectionRenderer` (IS a `UINavigationController`) hierarchy
with a layered `ShellHandler`, `ShellItemHandler`,
`ShellSectionHandler`, and `ShellContentHandler` architecture.

Navigation, tab-bar, and flyout management are implemented on top of the
shared Core platform managers:

- `NavigationControllerManager`
- `TabBarControllerManager`
- `FlyoutContainerManager`

This is the same infrastructure already used by the `NavigationPage`
(#36109), `TabbedPage` (#36507), and `FlyoutPage` (#36676) handler
migrations.

The new Shell handler is opt-in on iOS and Mac Catalyst. Applications
continue to use `ShellRenderer` unless they explicitly enable the new
implementation in their project file.

## Motivation

`ShellRenderer`, `ShellItemRenderer`, and `ShellSectionRenderer` are
renderer classes that directly inherit from `UIViewController`,
`UITabBarController`, and `UINavigationController`. Each renderer owns
flyout presentation, tab-bar management, navigation-stack management,
appearance tracking, and page lifecycle behavior.

This made Shell:

- **Hard to maintain** - flyout layout, tab selection, navigation-bar
appearance, and Controls-specific behavior are interleaved across large
renderer files.
- **Inconsistent with the handler architecture** - `NavigationPage`,
`TabbedPage`, and `FlyoutPage` have moved to handlers on iOS and Mac
Catalyst, while Shell still uses renderers.
- **Duplicative of shared infrastructure** - the shared navigation,
tab-bar, and flyout managers were designed for reuse by page
implementations such as Shell.
- **Prone to retain cycles** - renderers hold references to child
controllers, gesture recognizers, and delegates that require careful
teardown.
- **Not aligned with mapper-driven updates** - Android and Windows Shell
implementations use property and command mappers, while the iOS
renderers rely on manual property-change subscriptions.

## What Changed

### New Shell handlers

| File | Purpose |
|------|---------|
| `Handlers/Shell/ShellHandler.iOS.cs` | Root handler for `Shell`. Owns
the app root view controller and container view; drives flyout
presentation through `FlyoutContainerManager`; handles More-tab overflow
and status-bar/home-indicator forwarding; and exposes virtual factory
hooks for appearance trackers, page tracking, item and section handlers,
and flyout content. |
| `Handlers/Shell/ShellItemHandler.iOS.cs` | Handler for `ShellItem`.
Owns a `UITabBarController` through `TabBarControllerManager`; tracks
the current section, tab selection, More-tab overflow, badges, enabled
state, and tab-bar visibility. |
| `Handlers/Shell/ShellSectionHandler.iOS.cs` | Handler for
`ShellSection`. Owns a `UINavigationController` through
`NavigationControllerManager`; manages push/pop operations, per-page
navigation-bar appearance and visibility, and swipe-back behavior. |
| `Handlers/Shell/ShellContentHandler.iOS.cs` | Thin handler for
`ShellContent`. Its `Content` mapper forwards `ShellContent.Content`
changes to the owning `ShellSectionHandler`. |

### Modified files

| Area | File | Change |
|------|------|--------|
| Shared Core Managers |
`Platform/iOS/NavigationControllerManager/NavigationControllerManager.cs`
| Extended the shared navigation manager for Shell navigation scenarios.
|
| Shared Core Managers |
`Platform/iOS/TabBarControllerManager/TabBarControllerManager.cs`,
`ITabBarManagerDelegate.cs` | Added extension points so
`ShellItemHandler` can manage tab selection and More-tab navigation
through the shared manager. |
| Shared Core Managers |
`Platform/iOS/FlyoutContainerManager/FlyoutContainerManager.cs`,
`IFlyoutContainerDelegate.cs` | Added Shell-specific extension points
for overlay shadows, brush-based backdrops, and split/Locked flyout
behavior without changing existing `FlyoutPage` behavior. |
| Handler Reuse | `Handlers/FlyoutView/FlyoutViewHandler.iOS.cs`,
`Handlers/TabbedView/TabbedViewHandler.iOS.cs` | Added support for the
Shell-facing extension points on the shared managers. |
| Compatibility Reuse |
`Compatibility/Handlers/Shell/iOS/ShellFlyoutContentRenderer.cs`,
`ShellFlyoutLayoutManager.cs` | Adjusted renderer-only property
subscriptions so the handler path can drive updates through mapper
dispatch. |
| Compatibility Reuse |
`Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs` | Reused
for per-page navigation-bar and toolbar tracking under the handler
implementation. |
| Shared Mapper | `Handlers/Shell/ShellHandler.cs` | Enabled the shared
mapper and command mapper for iOS and Mac Catalyst and added
platform-specific mapper entries. |
| Handler Registration | `Hosting/AppHostBuilderExtensions.cs` | Keeps
`ShellRenderer` as the iOS and Mac Catalyst default and registers the
new Shell handler hierarchy when the runtime feature switch is enabled.
|
| Runtime Feature | `Core/src/RuntimeFeature.cs` | Adds
`IsiOSShellHandlerEnabled`, with a default value of `false`. |
| Build Configuration |
`Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.targets`
| Maps the `UseiOSShellHandler` project property to the runtime feature
switch. |
| Public API | `PublicAPI/net-ios/PublicAPI.Unshipped.txt`,
`PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt` | Records the new
public and protected handler surface, mapper methods, lifecycle
overrides, and virtual factory hooks introduced by the Shell handler
implementation. No public builder extension is added for opting in. |

## Architecture Overview

### Handler hierarchy

```text
┌────────────────────────────────────────────────────────────────┐
│                         CORE LAYER                             │
│  ShellHandler.iOS.cs        -> root VC, flyout, More tab,      │
│                                status bar and home indicator    │
│  ShellItemHandler.iOS.cs    -> tab-bar management              │
│  ShellSectionHandler.iOS.cs -> navigation stack, push/pop,     │
│                                swipe-back, navigation bar       │
│  ShellContentHandler.iOS.cs -> content-change bridge           │
├────────────────────────────────────────────────────────────────┤
│             SHARED CORE PLATFORM MANAGERS                     │
│  NavigationControllerManager / TabBarControllerManager /       │
│  FlyoutContainerManager                                       │
│                                                               │
│  Also used by NavigationPage, TabbedPage, and FlyoutPage       │
├────────────────────────────────────────────────────────────────┤
│              COMPATIBILITY LAYER REUSE                        │
│  IShellNavBarAppearanceTracker / IShellTabBarAppearanceTracker │
│  IShellPageRendererTracker / ShellFlyoutContentRenderer        │
│  ShellFlyoutLayoutManager                                     │
└────────────────────────────────────────────────────────────────┘
```

## Key Design Decisions

| Decision | Rationale |
|----------|-----------|
| **Use the shared Core platform managers** |
`NavigationControllerManager`, `TabBarControllerManager`, and
`FlyoutContainerManager` were designed for reuse by page
implementations. Using them keeps navigation, tab-bar, and flyout
behavior consistent and avoids another Shell-specific implementation. |
| **Add Shell behavior through extension points** | Shell-only
requirements such as overlay shadows, brush backdrops, locked layouts,
and More-tab delegate hooks are exposed through additive interfaces so
existing `FlyoutPage`, `TabbedPage`, and `NavigationPage` behavior is
preserved. |
| **Reuse compatibility trackers through adapters** |
`ShellItemHandlerAdapter : IShellItemRenderer` and
`ShellSectionHandlerAdapter : IShellSectionRenderer` allow the new
handlers to reuse the existing navigation-bar, tab-bar, page, toolbar,
and flyout tracking infrastructure. |
| **Preserve renderer extensibility through virtual factory methods** |
`ShellHandler` exposes `Create*` virtual methods so custom handler
implementations can replace appearance trackers and child handlers
similarly to custom renderer subclasses. |
| **Use mapper-driven property dispatch** | `ShellHandler`,
`ShellItemHandler`, `ShellSectionHandler`, and `ShellContentHandler` use
property and command mappers, matching the Android and Windows
implementations. |
| **Use `ShellContentHandler` as a content-change bridge** | Mapper
dispatch observes a handler's own virtual view. The thin
`ShellContentHandler` receives `ShellContent.Content` changes and
forwards them to the owning section handler. |
| **Keep the compatibility renderer as the default** | The handler
migration is a significant behavioral change. Keeping `ShellRenderer` as
the default allows existing applications to retain current behavior
while the new implementation is evaluated through an explicit opt-in. |
| **Use a project property for opt-in** | The existing build-transitive
runtime-feature pattern allows applications to enable the handler
without introducing a new public builder extension. |

## Key Interfaces Reused

| Interface | Consumer | Purpose |
|-----------|----------|---------|
| `IShellItemRenderer` | `ShellItemHandlerAdapter` | Allows
`ShellItemHandler` to participate in existing compatibility
infrastructure that expects an item renderer. |
| `IShellSectionRenderer` | `ShellSectionHandlerAdapter` | Allows
`ShellSectionHandler` to participate in existing compatibility
infrastructure that expects a section renderer. |
| `IShellNavBarAppearanceTracker` | `ShellSectionHandler` | Tracks
navigation-bar appearance. |
| `IShellTabBarAppearanceTracker` | `ShellItemHandler` | Tracks tab-bar
appearance. |
| `IShellPageRendererTracker` | `ShellSectionHandler` | Tracks per-page
navigation-bar, title-view, and toolbar behavior. |
| `IShellFlyoutContentRenderer` | `ShellHandler` | Provides the Shell
flyout content implementation. |

## Handler Registration and Opt-In

The compatibility `ShellRenderer` remains the default implementation on
iOS and Mac Catalyst.

To enable the new Shell handler, set `UseiOSShellHandler` to `true` in
the application project:

```xml
<PropertyGroup>
  <UseiOSShellHandler>true</UseiOSShellHandler>
</PropertyGroup>
```

When the property is absent or set to `false`, the application continues
to use `ShellRenderer`:

```xml
<PropertyGroup>
  <UseiOSShellHandler>false</UseiOSShellHandler>
</PropertyGroup>
```

The property is mapped to the following runtime host configuration
option:

```text
Microsoft.Maui.RuntimeFeature.IsiOSShellHandlerEnabled
```

The runtime feature switch defaults to `false`.

No `UseiOSShellHandler()` builder extension is introduced.

As an alternative to the project property, an application can manually
register the complete Shell handler hierarchy through
`ConfigureMauiHandlers` in `MauiProgram.cs`:

```csharp
#if IOS || MACCATALYST
builder.ConfigureMauiHandlers(handlersCollection =>
{
    handlersCollection.AddHandler<Shell, ShellHandler>();
    handlersCollection.AddHandler<ShellItem, ShellItemHandler>();
    handlersCollection.AddHandler<ShellSection, ShellSectionHandler>();
    handlersCollection.AddHandler<ShellContent, ShellContentHandler>();
});
#endif
```

All four mappings must be registered together because they form the
complete iOS and Mac Catalyst Shell handler hierarchy. Applications
using the `UseiOSShellHandler` project property do not need this manual
registration.

## Feature Parity

The handler implementation covers the existing Shell scenarios,
including:

- Flyout show/hide through programmatic changes and gestures.
- Flyout header, footer, background, backdrop, and vertical scroll mode.
- Split and Locked flyout layouts.
- Tab-bar item selection, badge text and color, enabled state, and
visibility.
- More-tab overflow for Shell items beyond the native tab limit.
- Navigation-stack push and pop operations.
- Per-page navigation-bar visibility and appearance.
- Navigation title, title color, background, back-button, and toolbar
behavior.
- Swipe-back gestures and programmatic-pop blocking.
- Right-to-left and `FlowDirection` propagation.
- Animated and non-animated modal navigation.
- Query-parameter handling through `IQueryAttributable`.
- Status-bar visibility and preferred update animation.
- Home-indicator auto-hide preferences.

## Compatibility and Migration Guidance

### Existing applications

Existing applications require no changes. If `UseiOSShellHandler` is not
set, they continue to use the compatibility `ShellRenderer`.

### Evaluating the new handler

Applications can evaluate the handler by setting:

```xml
<UseiOSShellHandler>true</UseiOSShellHandler>
```

Removing the property or setting it to `false` restores the
compatibility renderer.

### Custom renderer users

Applications that subclass or manually register `ShellRenderer`,
`ShellItemRenderer`, or `ShellSectionRenderer` can continue using those
implementations. The compatibility renderer classes remain available and
are still the default.

### Custom handler users

Applications that opt in and need custom behavior can subclass the new
handler classes or manually register custom handlers through
`ConfigureMauiHandlers`.

| Renderer pattern | Handler equivalent | Notes |
|------------------|--------------------|-------|
| `ShellRenderer` is a `UIViewController` | `ShellHandler` owns and
manages a `UIViewController` through `FlyoutContainerManager` | The
handler is a `ViewHandler<Shell, UIView>`, not a view-controller
subclass. |
| `ShellItemRenderer` is a `UITabBarController` | `ShellItemHandler`
owns and manages a `UITabBarController` through
`TabBarControllerManager` | The handler is an `ElementHandler<ShellItem,
UIView>`. |
| `ShellSectionRenderer` is a `UINavigationController` |
`ShellSectionHandler` owns and manages a `UINavigationController`
through `NavigationControllerManager` | The handler is an
`ElementHandler<ShellSection, UIView>`. |
| Override renderer methods to replace a tracker | Override the
corresponding `ShellHandler.Create*` virtual factory method | Preserves
customization of navigation-bar, tab-bar, page, section, and flyout
behavior. |
| Handle properties through `OnElementPropertyChanged` | Extend or
replace mapper entries | Provides one mapper method per supported
property or command. |

---------

Co-authored-by: Tamilarasan Paranthaman <93904422+Tamilarasan-Paranthaman@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets **net11.0** intentionally: its trigger consumers already support
lazy storage.

Remove the eager `_triggerSpecificity` initializer from
`BindableObject`. The existing `TriggerBase` attachment path allocates
storage before condition setup, even when the condition is initially
false. Objects without condition-bearing triggers, including those using
only `EventTrigger`, no longer allocate the unused dictionary.
Detach/reattach continues to reuse allocated storage; no consumer or
public API changes.

Add regression coverage for unused storage, initially true/false
conditions, condition changes, detach/reattach/clear, shared-style
isolation and trigger precedence, and `EventTrigger` behavior.

Direct source-built host tests: **214 passed / 5 expected null-storage
failures before the fix; 219 passed / 0 failed afterward**, including
trigger, data-trigger, multi-trigger, style and bindable-object
coverage. The verification wrapper could not resolve the test project;
these results come from explicit `dotnet test` runs.

The existing `CreateManyLabels_NoTriggers` benchmark measured
approximately **80 B less managed allocation per label** on macOS Arm64
with .NET 11 preview 7 (Release, BenchmarkDotNet short in-process job).
This is warmed host allocation evidence, not retained-memory or phone
startup/GC savings.

### Issues Fixed

Restores the lazy-allocation behavior from #34133, whose initializer
removal was lost in the net11 merge #35932.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

Updates `MicrosoftMauiPreviousDotNetReleasedVersion` from `10.0.20` to
`10.0.101` for .NET 11 builds.

## Testing

- XML validation (`xmllint --noout eng/Versions.props`)
- `git diff --check`

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Targets `net11.0`. Isolate capturing callbacks in private helpers so
synchronous and early-return paths do not allocate their closure state
unnecessarily.

This covers:
- Synchronous `AppThemeBinding` application and immediate Shell page
appearance/removal.
- Runtime XAML error handlers and `OnIdiom`/`OnPlatform` default-value
and custom-converter paths.
- Already-cancelled animations.
- iOS/MacCatalyst transformation updates and search-bar selection
updates.

Setter/evaluation order, captured state, deferred execution, and event
cleanup are preserved. No public API changes or allocation tests are
added.

Measurements below apply **only to the original AppThemeBinding
change**, not the additional paths:
- Source-built .NET 11 host: **32 -> 0 B** per synchronous apply;
dispatched apply stays **88 B**.
- Samsung A16: **13.6 KiB less startup allocation (-0.1443%)** on
average across 24 cold launches per variant. This used an audited,
source-equivalent IL overlay on the pinned Android Controls assembly,
not a source-built Android workload.

The additional paths were checked in Release IL; their runtime savings
have not been measured. No retained-heap or startup-speed improvement is
claimed.

### Issues Fixed

N/A - allocation optimization.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…olver strongly retains its delegate target (#38289)

<!-- Please keep the note below for people who find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment whether this change resolves your
issue. Thank you!

This pull request introduces a new method to the `DependencyResolver`
class to allow clearing the registered resolver, and adds comprehensive
unit tests to verify memory management and prevent memory leaks. The
main focus is to ensure that any objects captured by the resolver can be
released when no longer needed, improving memory safety.

### Description of Change

**DependencyResolver API and Implementation:**
* Added a new static method `ResetResolver()` to `DependencyResolver`,
which clears the currently registered resolver and releases any
references it holds.
* Exposed the new `ResetResolver()` method in the public API files for
all supported platforms (`net`, `netstandard`, `net-android`, `net-ios`,
`net-maccatalyst`, `net-tizen`, `net-windows`).
[[1]](diffhunk://#diff-b98fb401b945e281e04d9aabd0695677c639da1423ae935f1e521e88e8cae021R8)
[[2]](diffhunk://#diff-4731d7bdf78f0e9d2a7a64d6f56502e3d2095313d039e7f09c0e7d1552471f8eR28)
[[3]](diffhunk://#diff-793476570313a2965972f9be2c01f3eaaf5eec16dfab1b6b7e34cd5473af4277R19)
[[4]](diffhunk://#diff-923a9c83577000b182ef448083ba67a73bd622126eafbd11d265afe0e2387a68R10)

**Testing and Validation:**
* Added a new test class `DependencyResolverMemoryLeak` with multiple
test cases to ensure that the resolver does not cause memory leaks, and
that `ResetResolver()` correctly releases captured targets. The tests
use weak references and forced garbage collection to verify object
lifetimes.


<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #37827 

### Tested the behavior in the following platforms

- [x] Windows
- [x] Android
- [x] iOS
- [x] Mac


| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/700f7717-ac92-4018-af75-902ac24e28bd">
| <video
src="https://github.com/user-attachments/assets/2657eb9f-c036-40d2-bb69-1cfc411314ac">
|

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
…net/macios (#38355)

This pull request updates the following dependencies

[marker]: <> (Begin:Coherency Updates)
## Coherency Updates

The following updates ensure that dependencies with a
*CoherentParentDependency*
attribute were produced in a build used as input to the parent
dependency's build.
See [Dependency Description
Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

[DependencyUpdate]: <> (Begin)

- **Coherency Updates**:
- **Microsoft.MacCatalyst.Sdk.net10.0_26.5**: from 26.5.10311 to
26.5.10320 (parent: Microsoft.MacCatalyst.Sdk.net11.0_26.5)
- **Microsoft.macOS.Sdk.net10.0_26.5**: from 26.5.10311 to 26.5.10320
(parent: Microsoft.macOS.Sdk.net11.0_26.5)
- **Microsoft.iOS.Sdk.net10.0_26.5**: from 26.5.10311 to 26.5.10320
(parent: Microsoft.iOS.Sdk.net11.0_26.5)
- **Microsoft.tvOS.Sdk.net10.0_26.5**: from 26.5.10311 to 26.5.10320
(parent: Microsoft.tvOS.Sdk.net11.0_26.5)

[DependencyUpdate]: <> (End)

[marker]: <> (End:Coherency Updates)

[marker]: <> (Begin:1ae85174-dfc1-4a00-b3c3-5a31c41fb9cf)
## From https://github.com/dotnet/macios
- **Subscription**:
[1ae85174-dfc1-4a00-b3c3-5a31c41fb9cf](https://maestro.dot.net/subscriptions?search=1ae85174-dfc1-4a00-b3c3-5a31c41fb9cf)
- **Build**:
[20260908.5](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=15246407)
([331024](https://maestro.dot.net/channel/8298/github:dotnet:macios/build/331024))
- **Date Produced**: September 8, 2026 8:58:24 PM UTC
- **Commit**:
[d7683839ba11082feff6e541e80988fdd798160b](dotnet/macios@d768383)
- **Branch**: [main](https://github.com/dotnet/macios/tree/main)

[DependencyUpdate]: <> (Begin)

- **Dependency Updates**:
  - From [26.5.11992-net11-rc.1 to 26.5.12248-net11-rc.2][1]
     - Microsoft.iOS.Sdk.net11.0_26.5
     - Microsoft.MacCatalyst.Sdk.net11.0_26.5
     - Microsoft.macOS.Sdk.net11.0_26.5
     - Microsoft.tvOS.Sdk.net11.0_26.5

[1]: dotnet/macios@17d5ebd...d768383

[DependencyUpdate]: <> (End)


[marker]: <> (End:1ae85174-dfc1-4a00-b3c3-5a31c41fb9cf)



[marker]: <> (Begin:f4928934-9e75-4ba7-b3d0-757a5edf906c)
## From https://github.com/dotnet/dotnet
- **Subscription**:
[f4928934-9e75-4ba7-b3d0-757a5edf906c](https://maestro.dot.net/subscriptions?search=f4928934-9e75-4ba7-b3d0-757a5edf906c)
- **Build**:
[20260908.3](https://dev.azure.com/dnceng/internal/_build/results?buildId=3069500)
([330971](https://maestro.dot.net/channel/8298/github:dotnet:dotnet/build/330971))
- **Date Produced**: September 8, 2026 5:00:40 PM UTC
- **Commit**:
[bcd0a2de8927de44b65f3ad41bef8820ee2b3d0b](dotnet/dotnet@bcd0a2d)
- **Branch**:
[release/11.0.1xx](https://github.com/dotnet/dotnet/tree/release/11.0.1xx)

[DependencyUpdate]: <> (Begin)

- **Dependency Updates**:
  - From [11.0.0-rc.1.26420.103 to 11.0.0-rc.2.26458.103][2]
     - Microsoft.AspNetCore.Authentication.Facebook
     - Microsoft.AspNetCore.Authentication.Google
     - Microsoft.AspNetCore.Authentication.MicrosoftAccount
     - Microsoft.AspNetCore.Authorization
     - Microsoft.AspNetCore.Components
     - Microsoft.AspNetCore.Components.Analyzers
     - Microsoft.AspNetCore.Components.Forms
     - Microsoft.AspNetCore.Components.Web
     - Microsoft.AspNetCore.Components.WebAssembly
     - Microsoft.AspNetCore.Components.WebAssembly.Server
     - Microsoft.AspNetCore.Components.WebView
     - Microsoft.AspNetCore.Metadata
     - Microsoft.Extensions.Configuration
     - Microsoft.Extensions.Configuration.Abstractions
     - Microsoft.Extensions.Configuration.Json
     - Microsoft.Extensions.DependencyInjection
     - Microsoft.Extensions.DependencyInjection.Abstractions
     - Microsoft.Extensions.FileProviders.Abstractions
     - Microsoft.Extensions.Hosting.Abstractions
     - Microsoft.Extensions.Logging
     - Microsoft.Extensions.Logging.Abstractions
     - Microsoft.Extensions.Logging.Console
     - Microsoft.Extensions.Logging.Debug
     - Microsoft.Extensions.Primitives
     - Microsoft.JSInterop
     - Microsoft.NETCore.App.Ref
  - From [11.0.0-beta.26420.103 to 11.0.0-beta.26458.103][2]
     - Microsoft.DotNet.Arcade.Sdk
     - Microsoft.DotNet.Build.Tasks.Feed
     - Microsoft.DotNet.Build.Tasks.Installers
     - Microsoft.DotNet.Build.Tasks.Workloads
     - Microsoft.DotNet.Helix.Sdk
     - Microsoft.DotNet.RemoteExecutor
     - Microsoft.DotNet.SharedFramework.Sdk
     - Microsoft.DotNet.XUnitExtensions
  - From [11.0.0-beta.26427.10 to 11.0.0-beta.26458.103][3]
     - Microsoft.DotNet.Helix.JobMonitor
  - From [11.0.100-rc.1.26420.103 to 11.0.100-rc.2.26458.103][2]
     - Microsoft.NET.Sdk

[2]: dotnet/dotnet@1d59967...bcd0a2d
[3]: dotnet/dotnet@2cdfe99...bcd0a2d

[DependencyUpdate]: <> (End)


[marker]: <> (End:f4928934-9e75-4ba7-b3d0-757a5edf906c)



[marker]: <> (Begin:9a046932-c60c-436e-8fc7-8ea2f5902cb5)
## From https://github.com/dotnet/android
- **Subscription**:
[9a046932-c60c-436e-8fc7-8ea2f5902cb5](https://maestro.dot.net/subscriptions?search=9a046932-c60c-436e-8fc7-8ea2f5902cb5)
- **Build**:
[11.0.0-preview.7.26458.1+azdo.15246749](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=15246749)
([331028](https://maestro.dot.net/channel/8298/github:dotnet:android/build/331028))
- **Date Produced**: September 8, 2026 9:11:58 PM UTC
- **Commit**:
[71ecec2753276cd8b15e71db5453d85ebfa25bd2](dotnet/android@71ecec2)
- **Branch**: [main](https://github.com/dotnet/android/tree/main)

[DependencyUpdate]: <> (Begin)

- **Dependency Updates**:
  - From [37.0.0-rc.1.2256 to 37.0.0-rc.2.2437][4]
     - Microsoft.Android.Sdk.Windows

[4]: dotnet/android@28d217e...71ecec2

[DependencyUpdate]: <> (End)


[marker]: <> (End:9a046932-c60c-436e-8fc7-8ea2f5902cb5)

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a35c4f9-c68c-469c-b335-c3a13cba613f
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Adds a dependency-free C# UI option to the .NET MAUI app template while
preserving XAML as the default.

- Adds `--ui xaml|csharp` to the `maui` template.
- Generates `App.cs`, `AppShell.cs`, and `MainPage.cs` when C# UI is
selected.
- Keeps the existing XAML output unchanged when XAML is selected.
- Supports C# UI with Avalonia handlers.
- Treats sample content as XAML-only and reports a clear post-action
warning when it is requested with C# UI.
- Treats Avalonia as incompatible with the XAML sample content and
reports a clear post-action warning when both are requested.
- Preserves the established `IncludeSampleContent` CLI symbol so
side-by-side .NET 10 and .NET 11 template packs expose exactly one
`--sample-content` option.
- Uses the host-specific computed `UseSampleContent` state so CLI and
IDE sample-content selections compose correctly.

### Validation

Validated the full eight-combination matrix of XAML/C# UI, sample
content, and Avalonia on generated Windows apps, including build,
launch, and UI Automation interaction. Also validated side-by-side .NET
10 and .NET 11 template installation, template help, generated
file/package selection, warning output, and original XAML template
behavior. CI build 1586919 passed, including Windows and macOS template
build integration suites.

---------
Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
dotnet-maestro Bot and others added 4 commits September 10, 2026 16:27
)

This pull request updates the following dependencies

[marker]: <> (Begin:f4928934-9e75-4ba7-b3d0-757a5edf906c)
## From https://github.com/dotnet/dotnet
- **Subscription**:
[f4928934-9e75-4ba7-b3d0-757a5edf906c](https://maestro.dot.net/subscriptions?search=f4928934-9e75-4ba7-b3d0-757a5edf906c)
- **Build**:
[20260908.9](https://dev.azure.com/dnceng/internal/_build/results?buildId=3069878)
([331079](https://maestro.dot.net/channel/8298/github:dotnet:dotnet/build/331079))
- **Date Produced**: September 9, 2026 1:40:35 AM UTC
- **Commit**:
[c65c25f0c9889e06a5d70e275c741d8430fa353a](dotnet/dotnet@c65c25f)
- **Branch**:
[release/11.0.1xx](https://github.com/dotnet/dotnet/tree/release/11.0.1xx)

[DependencyUpdate]: <> (Begin)

- **Dependency Updates**:
  - From [11.0.0-rc.2.26458.103 to 11.0.0-rc.2.26458.109][1]
     - Microsoft.AspNetCore.Authentication.Facebook
     - Microsoft.AspNetCore.Authentication.Google
     - Microsoft.AspNetCore.Authentication.MicrosoftAccount
     - Microsoft.AspNetCore.Authorization
     - Microsoft.AspNetCore.Components
     - Microsoft.AspNetCore.Components.Analyzers
     - Microsoft.AspNetCore.Components.Forms
     - Microsoft.AspNetCore.Components.Web
     - Microsoft.AspNetCore.Components.WebAssembly
     - Microsoft.AspNetCore.Components.WebAssembly.Server
     - Microsoft.AspNetCore.Components.WebView
     - Microsoft.AspNetCore.Metadata
     - Microsoft.Extensions.Configuration
     - Microsoft.Extensions.Configuration.Abstractions
     - Microsoft.Extensions.Configuration.Json
     - Microsoft.Extensions.DependencyInjection
     - Microsoft.Extensions.DependencyInjection.Abstractions
     - Microsoft.Extensions.FileProviders.Abstractions
     - Microsoft.Extensions.Hosting.Abstractions
     - Microsoft.Extensions.Logging
     - Microsoft.Extensions.Logging.Abstractions
     - Microsoft.Extensions.Logging.Console
     - Microsoft.Extensions.Logging.Debug
     - Microsoft.Extensions.Primitives
     - Microsoft.JSInterop
     - Microsoft.NETCore.App.Ref
  - From [11.0.0-beta.26458.103 to 11.0.0-beta.26458.109][1]
     - Microsoft.DotNet.Arcade.Sdk
     - Microsoft.DotNet.Build.Tasks.Feed
     - Microsoft.DotNet.Build.Tasks.Installers
     - Microsoft.DotNet.Build.Tasks.Workloads
     - Microsoft.DotNet.Helix.JobMonitor
     - Microsoft.DotNet.Helix.Sdk
     - Microsoft.DotNet.RemoteExecutor
     - Microsoft.DotNet.SharedFramework.Sdk
     - Microsoft.DotNet.XUnitExtensions
  - From [11.0.100-rc.2.26458.103 to 11.0.100-rc.2.26458.109][1]
     - Microsoft.NET.Sdk

[1]: dotnet/dotnet@bcd0a2d...c65c25f

[DependencyUpdate]: <> (End)


[marker]: <> (End:f4928934-9e75-4ba7-b3d0-757a5edf906c)



[marker]: <> (Begin:9a046932-c60c-436e-8fc7-8ea2f5902cb5)
## From https://github.com/dotnet/android
- **Subscription**:
[9a046932-c60c-436e-8fc7-8ea2f5902cb5](https://maestro.dot.net/subscriptions?search=9a046932-c60c-436e-8fc7-8ea2f5902cb5)
- **Build**:
[11.0.0-preview.7.26459.1+azdo.15256576](https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=15256576)
([331121](https://maestro.dot.net/channel/8298/github:dotnet:android/build/331121))
- **Date Produced**: September 9, 2026 7:36:44 AM UTC
- **Commit**:
[9f52486c649befbeabf956d4914aa91e36c584a0](dotnet/android@9f52486)
- **Branch**: [main](https://github.com/dotnet/android/tree/main)

[DependencyUpdate]: <> (Begin)

- **Dependency Updates**:
  - From [37.0.0-rc.2.2437 to 37.0.0-rc.2.2443][2]
     - Microsoft.Android.Sdk.Windows

[2]: dotnet/android@71ecec2...9f52486

[DependencyUpdate]: <> (End)


[marker]: <> (End:9a046932-c60c-436e-8fc7-8ea2f5902cb5)

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Adds direct regression coverage for the repeated-edit `ENC1002` failure
tracked by #36824.

The product fix already merged in #36833: `UpdateComponent()` is emitted
from generation zero and retained across every subsequent generator run,
preventing Roslyn from losing the identity of a method first introduced
in an EnC delta. The tracking issue remained open because the exact
reported sequence was not represented by one test.

This change extends the Hot Reload harness so a scenario can update
`Page.cs` between XAML generations and include the changed user method
in Roslyn's semantic edits. The issue-specific tests now exercise:

- a XAML edit, followed by a C#-only edit, followed by another XAML edit
through real `EmitDifference` and `MetadataUpdater.ApplyUpdate` calls;
- `UpdateComponent()` presence across baseline, property, no-op, and
structural generations;
- invalid intermediate XAML followed by deterministic recovery;
- deterministic baseline output across isolated compilations.

The harness also retains the registered `AdditionalText` instance for
unchanged XAML documents. Without that, a no-op generation replaced the
harness's bookkeeping object without replacing the driver's object, and
the next real XAML edit failed before reaching Roslyn EnC.

### Issues Fixed

Fixes #36824

### Tests

- `Maui36824Tests`: 4 passed
- `SourceGen.UnitTests`: 545 passed

Copilot-Session: c30817d7-694e-4593-8efc-dc56ecfaeba1
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Completes SourceGen XAML Hot Reload support for classless external
resource dictionaries merged through `App.xaml` with
`<ResourceDictionary Source="..." />`.

The previous fix generated updates for application resources with
`x:Class`, but two propagation boundaries were still missing for the
classless dictionaries used by the standard MAUI templates:

- The Hot Reload generation gate only resolved roots declared with
`x:Class`, so classless generated dictionary types did not receive an
`UpdateComponent` patch.
- The `ResourceDictionary Source=` wrapper did not forward
`ValuesChanged` from its generated source instance, so existing
`DynamicResource` consumers were not notified after the dictionary
changed.

This change shares the existing `XamlResourceIdAttribute`-based
generated-root resolution with the Hot Reload path and weakly forwards
source dictionary value changes through the wrapper. The weak proxy
avoids retaining discarded wrapper dictionaries through the statically
cached generated source dictionary.

Regression coverage models the reported `App.xaml` → classless external
dictionary → `DynamicResource` flow and verifies both existing and newly
created consumers. A focused `ResourceDictionary` test covers source
change forwarding.

### Issues Fixed

Fixes #37888

@JanKrivanek this addresses the classless external dictionary case from
your latest E2E report. Once artifacts are available, the VS Code Hot
Reload pipeline should be able to validate the exact scenario.

### Tests

- SourceGen unit tests: 542 passed
- ResourceDictionary tests: 43 passed

Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4755b789-cfd9-4117-a26a-4fd2d44663fc
Copilot-Session: 169298fa-95aa-47a4-ad1c-512dc3f97871
Reset patterns:
- global.json
- NuGet.config
- eng/Version.Details.xml
- eng/Versions.props
- eng/common/*
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service dotnet-policy-service Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved automated inter-branch merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.