Skip to content

[automated] Merge branch 'main' => 'net11.0' - #36733

Merged
kubaflo merged 228 commits into
net11.0from
merge/main-to-net11.0
Jul 25, 2026
Merged

kubaflo merged 228 commits into
net11.0from
merge/main-to-net11.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

This PR merges commits made on main by the following committers:

  • PureWeen
  • Copilot
  • kubaflo
  • dependabot[bot]
  • github-actions[bot]
  • sheiksyedm
  • TamilarasanSF4853
  • jfversluis
  • BagavathiPerumal
  • devanathan-vaithiyanathan
  • Dhivya-SF4094
  • SubhikshaSf4851
  • SyedAbdulAzeemSF4852
  • praveenkumarkarunanithi
  • Vignesh-SF3580
  • HarishwaranVijayakumar
  • HarishKumarSF4517

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 main
git pull --ff-only
git checkout net11.0
git pull --ff-only
git merge --no-ff main

# 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/main-to-net11.0
or if you are using SSH
git push git@github.com:dotnet/maui HEAD:merge/main-to-net11.0

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/main-to-net11.0'. 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/main-to-net11.0 origin/net11.0
git pull https://github.com/dotnet/maui merge/main-to-net11.0
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet/maui HEAD:merge/main-to-net11.0
or if you are using SSH
git fetch
git checkout -b merge/main-to-net11.0 origin/net11.0
git pull git@github.com:dotnet/maui merge/main-to-net11.0
(make changes)
git commit -m "Updated PR with my changes"
git push git@github.com:dotnet/maui HEAD:merge/main-to-net11.0

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.

KarthikRajaKalaimani and others added 30 commits June 2, 2026 14:33
)

<!-- 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 Details:

Horizontalspacing / Verticalspacing is not not applied to the first
column in GridItemLayout using CollectionView on Android platform.
        
### Root Cause:

The grid spacing was not being distributed symmetrically across the
active layout implementations, so edge items did not fully participate
when spacing changed at runtime.

### Description of Change:

- On Android, the fix in MauiRecyclerView.cs changes how RecyclerView
padding is handled for GridItemsLayout. Android was already using
SpacingItemDecoration, which applies half-spacing on all four sides of
each item. Previously, negative RecyclerView padding canceled that
spacing at the control edges. The branch keeps that negative-padding
behavior for non-grid layouts, but disables it for GridItemsLayout,
allowing the grid’s half-spacing to remain visible at the outer
perimeter. This makes the first row and first column visually respond
when spacing changes, but it also changes the grid behavior from spacing
only between items to spacing around the outside edges as well.

**Tested the behavior in the following platforms:**

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

### Reference:

N/A

### Issues Fixed:

Fixes  #34257      

### Screenshots
| Before  | After  |
|---------|--------|
| <Video
src="https://github.com/user-attachments/assets/578dda69-1d60-474c-a6d8-23b3f9d29a50"
Width="300" Height="600"> | <Video
src="https://github.com/user-attachments/assets/7f3826e6-5922-4b6f-a6b9-de581b7db6c3"
Width="300" Height="600"> |
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->
This pull request standardizes the namespace declarations for several
test case files related to issues in the test suite. The changes ensure
that all files use the correct `Microsoft.Maui.TestCases.Tests.Issues`
namespace, improving consistency and maintainability.

**Namespace corrections:**

* Changed the namespace in `Issue22075.cs` from
`Microsoft.Maui.TestCases.Tests.Issue` to
`Microsoft.Maui.TestCases.Tests.Issues` to match the naming convention.
* Updated the namespace in `Issue28968.cs` from
`Microsoft.Maui.TestCases.Tests.Tests.Issues` to
`Microsoft.Maui.TestCases.Tests.Issues`.
* Updated the namespace in `Issue29588.cs` from
`Microsoft.Maui.TestCases.Tests.Tests.Issues` to
`Microsoft.Maui.TestCases.Tests.Issues`.
* Changed the namespace in `Issue33227.cs` from
`Maui.Controls.TestCases.Tests.Issues` to
`Microsoft.Maui.TestCases.Tests.Issues`.
…35092)

<!-- 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!<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

This pull request addresses an issue where the `WebView` rendered blank
when both a `HybridWebView` and a regular `WebView` coexisted in the
same Windows (UWP) app. The main fix ensures that `HybridWebView` only
creates a custom `CoreWebView2Environment` if custom settings are
provided, allowing both controls to share the default environment and
preventing conflicts. Additionally, new test cases have been added to
verify the fix.
### Description of Change
**Bug fix for WebView and HybridWebView coexistence:**

* Updated `HybridWebViewHandler.Windows.cs` so that a custom
`CoreWebView2Environment` is created only if the user provides custom
settings; otherwise, the default shared environment is used. This
prevents conflicts when both `HybridWebView` and `WebView` are present
in the same app, resolving the blank rendering issue.
[[1]](diffhunk://#diff-9adaedb7571e93283664d8e3db8d34930d748bbe1207eb004f53e25e08eaaaeaR310-R325)
[[2]](diffhunk://#diff-9adaedb7571e93283664d8e3db8d34930d748bbe1207eb004f53e25e08eaaaeaR337-R341)

**Test coverage improvements:**

* Added a new UI test in
`TestCases.Shared.Tests/Tests/Issues/Issue34558.cs` to verify that the
regular `WebView` renders content successfully when coexisting with a
`HybridWebView`.
* Introduced a new test case page in
`TestCases.HostApp/Issues/Issue34558.cs` that sets up both controls and
provides UI elements for automated verification.



<!-- 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 #34558 
### Tested the behavior in the following platforms

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

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/4ba3435a-99af-4e7e-82be-6dbb588e07b6">
| <video
src="https://github.com/user-attachments/assets/fb5b1e22-b317-4421-829c-0f9b15c84e77">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
…PI changes) (#35095)

<!-- 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

Enables third-party platform backends (for example Maui.Gtk) to provide
their own `DisplayAlertAsync` / `DisplayActionSheetAsync` /
`DisplayPromptAsync` implementations without MAUI exposing any new
public API. This complements #33267: because that PR introduces a new
public interface, it must wait for .NET 11. This PR solves the same
problem using already-shipped public argument types, so it is shippable
in .NET 10.

`AlertManager.Subscribe()` now keeps the existing explicit internal
`IAlertManagerSubscription` path, then checks for keyed delegate
registrations before falling back to the platform default. The delegate
signatures use only existing public types:

```csharp
Func<Page, AlertArguments,       Task<bool>>
Func<Page, ActionSheetArguments, Task<string>>
Func<Page, PromptArguments,      Task<string>>
```

The registrations are keyed so MAUI does not accidentally consume
unrelated `Func<>` services:

| Dialog | Service key |
|---|---|
| Alert | `Microsoft.Maui.Controls.DisplayAlert` |
| Action sheet | `Microsoft.Maui.Controls.DisplayActionSheet` |
| Prompt | `Microsoft.Maui.Controls.DisplayPrompt` |

Consumer usage:

```csharp
builder.Services.AddKeyedSingleton<Func<Page, AlertArguments, Task<bool>>>(
    "Microsoft.Maui.Controls.DisplayAlert",
    async (page, args) =>
    {
        return await MyGtkDialog.ShowAsync(args.Title, args.Message, args.Accept, args.Cancel);
    });
```

If any keyed delegate is registered, MAUI wraps it in a new internal
`DelegateAlertSubscription`. Registered operations dispatch to their
delegate; unregistered operations fall through to the platform default.
The delegate returns the dialog result and MAUI completes the
corresponding `AlertArguments`, `ActionSheetArguments`, or
`PromptArguments` internally. If the delegate returns `null`, faults, or
cancels, the caller observes that through the original `Display*Async`
task instead of hanging silently.

Precedence order in `Subscribe()`:

1. Explicit `IAlertManagerSubscription` service (existing internal path,
unchanged)
2. Keyed result-returning delegate convention (new)
3. Platform default subscription (existing fallback)

### Notes for reviewers

- Zero public API surface: no `PublicAPI.*.txt` changes. The new
`DelegateAlertSubscription` class and key constants are internal;
consumers use literal string keys documented on the existing argument
types.
- Keyed registrations are intentional. Unkeyed `Func<>` services are
ignored to avoid accidental collisions.
- The delegate returns the dialog result instead of calling
`args.SetResult(...)`. This matches the built-in async platform pattern
where MAUI completes the argument after awaiting the native dialog
result.
- Per-operation fall-through is intentional. A backend can override just
alerts and keep the platform action sheet/prompt, for example.
- `OnPageBusy` is excluded from the convention (obsolete in .NET 10,
removed in .NET 11) and always routes to the fallback.
- When .NET 11 ships a proper public
`IAlertManager`/`IAlertDialogProvider`, this delegate convention can
stay as a lightweight alias or be deprecated. Either way, .NET 10
consumers are unblocked now.

### Tests

Unit coverage in `AlertManagerTests.cs` includes:

- Alert, action sheet, and prompt delegate dispatch
- Returned delegate results completing the original `Display*Async`
caller
- Unregistered operation fall-through
- Unkeyed delegate services being ignored
- Explicit `IAlertManagerSubscription` precedence
- Synchronous and asynchronous delegate faults
- Delegate cancellation forwarding
- Null task contract violation

Focused `AlertManagerTests` pass locally: 21/21.

### Issues Fixed

Fixes #34104

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…ing ToPlatform and subsequent property changes (#31159)

<!-- 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. !!!!!!!
-->

### Description of Change

- The iOS Label performance was improved in PR #30864. In that PR, the
Label and Entry Feature Matrix test sample and script were modified,
which caused discrepancies in the expected images due to changes which
is due to test sample's default property values. In this PR, I updated
the test sample and re-saved the images accordingly.

- Windows - The Entry is now unfocused, so I re-saved the latest image.
- Android - I modified the test sample by altering the default values
and re-saved two images.

Additionally, while working on the test sample changes, I identified and
fixed issues in FormattedStringExtensions.

These updates improve formatted text rendering on iOS by correctly
propagating span properties (font, character spacing, and line-break
settings) from the label to each span. The layout logic is also more
robust, falling back to MAUI’s calculated size when iOS has not yet
provided a valid label size, preventing incorrect text positioning and
rendering issues.

### 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. -->

Contributing to #30864

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
Co-authored-by: albyrock87 <albyrock87@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	src/Controls/tests/TestCases.HostApp/Issues/Issue34671.cs
The Visual Studio signing scan flags unsigned files inside MAUI workload
pack MSIs. This PR adds signing configuration for two categories of
unsigned files:

### 1. Unsigned `.cab` files (75 files across 75 payloads)

Every MAUI workload pack MSI contains an embedded `cab1.cab.cab` cabinet
archive that is currently unsigned. This affects 69 `maui*` payloads and
6 `aspnetcorewebviewmaui*` payloads across net9.0/net10.0 ×
arm64/x64/x86.

**Fix:** Add `FileExtensionSignInfo` for `.cab` with `Microsoft400`
(which Arcade auto-converts to `MicrosoftDotNet500` since
`UseDotNetCertificate` is `true`).

**Affected payloads (cab):**
- `mauicontrols{10020100200,90120901200}{arm64,x64,x86}`
- `mauicontrolsbuildtasks{10020100200,90120901200}{arm64,x64,x86}`
- `mauicontrolscompatibility90120901200{arm64,x64,x86}`
- `mauicontrolscore{10020100200,90120901200}{arm64,x64,x86}`
- `mauicontrolsxaml{10020100200,90120901200}{arm64,x64,x86}`
- `mauicore{10020100200,90120901200}{arm64,x64,x86}`
- `mauiessentials{10020100200,90120901200}{arm64,x64,x86}`
- `mauigraphics{10020100200,90120901200}{arm64,x64,x86}`
- `mauigraphicswindows{10020100200,90120901200}{arm64,x64,x86}`
- `mauiresizetizer{10020100200,90120901200}{arm64,x64,x86}`
- `mauisdknet{10,9}{10020100200,90120901200}{arm64,x64,x86}`
- `mauitemplatesnet{10,9}{10020100200,90120901200}{arm64,x64,x86}`
- `aspnetcorewebviewmaui{10020100200,90120901200}{arm64,x64,x86}`

### 2. Unsigned `ReconnectModal.razor.js` (3 files)

The Blazor reconnect modal script from
`Microsoft.AspNetCore.Components.Web` is packed into
`mauitemplatesnet10` workload MSIs without a signature.

**Fix:** Add `FileSignInfo` for `ReconnectModal.razor.js` with
`Microsoft400`.

**Affected payloads (js):**
- `mauitemplatesnet1010020100200{arm64,x64,x86}`
…latform (#35179)

<!-- 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 Details:

DragGestureRecognizer.DropCompleted event not firing in Android platform
       
### Root Cause:

DragAndDropGestureHandler.SetupHandlerForDrop() only called
SetOnDragListener(this) when the view had a DropGestureRecognizer. On
Android, DragAction.Ended is only delivered to views that have a drag
listener registered. A view with only a DragGestureRecognizer (no
DropGestureRecognizer) never registered a listener → never received
DragAction.Ended → HandleDropCompleted never called → DropCompleted
event never fired.

### Description of Change:

The fix is in
src/Controls/src/Core/Platform/Android/DragAndDropGestureHandler.cs.
Modified the listener registration for drag-source-only views (those
with no DropGestureRecognizer) is now done just before
StartDragAndDrop() is called, scoping it to the active drag and
preventing sibling views in the same layout from accidentally becoming
drag listeners. In the DragAction.Ended handler, the fix always
dispatches DropCompleted to the tracked dragSourceElement regardless of
which view received the event — since on Android, DragAction.Ended can
arrive on a non-source view first. A one-shot DropCompletedSent flag on
the local drag state prevents the event from firing more than once. Once
the source view receives DragAction.Ended, the temporary listener is
unregistered to restore the original state.

**Tested the behavior in the following platforms: **

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

### Reference:

N/A

### Issues Fixed:

Fixes  #17554          

### Screenshots
| Before  | After  |
|---------|--------|
| <Video width="300" height="600"
src="https://github.com/user-attachments/assets/243dec05-a560-4d26-87dd-cb6e8b99ab27"
/> | <Video width="300" height="600"
src="https://github.com/user-attachments/assets/3137deb3-4f45-476e-8e96-15661609c546"
/> |
- ICrossPlatformLayout.CrossPlatformArrange can call LayoutButton with a
null button so it should be prepared for that.

Fixes #31048

---------
…35086)

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

<!-- 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
TabbedPage tab titles get truncated on Android when there are more than
3 tabs (e.g., "New Tab 1" shows as "N..."). Tabs should scroll
horizontally and show full titles.

### Root Cause
TabbedPageManager.cs creates the Android TabLayout with TabMode =
TabLayout.ModeFixed, which divides screen width equally among all tabs.

### Description of Change
Changed TabMode from ModeFixed to ModeScrollable in which sizes tabs to
fit their content and enables horizontal scrolling.
 

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

### Output  ScreenShot

|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/1e984577-08aa-4091-b1fc-53bac5511154"
>| <video
src="https://github.com/user-attachments/assets/8c3ef77b-5d1a-480c-8e33-c3f485d04b53">|
…ebViewHandler in AddControlsHandlers (#34868)

`AOTTemplateTest.PublishNativeAOT` and
`PublishNativeAOTRootAllMauiAssemblies` fail on Android NativeAOT
because the Android ILC (SDK 36.99.0-preview.3.10) emits unexpected
`IL3050` warnings for `HybridWebViewHandler` constructors—despite the
call site already being correctly guarded by a
`[FeatureGuard]`-annotated feature switch.

## Why the warnings appear

`HybridWebViewHandler` carries
`[RequiresDynamicCode]`/`[RequiresUnreferencedCode]` because it uses
dynamic `System.Text.Json` serialization. The registration in
`AddControlsHandlers` is inside a proper feature guard:

```csharp
// RuntimeFeature.IsHybridWebViewSupported has:
//   [FeatureGuard(typeof(RequiresDynamicCodeAttribute))]
//   [FeatureGuard(typeof(RequiresUnreferencedCodeAttribute))]
// MauiHybridWebViewSupported=false is set by MSBuild targets when PublishAot=true
if (RuntimeFeature.IsHybridWebViewSupported)
{
    handlersCollection.AddHandler<HybridWebView, HybridWebViewHandler>();
}
```

The iOS/macCatalyst NativeAOT ILC correctly honors `[FeatureGuard]` and
suppresses the warnings. The Android NativeAOT ILC does not, so
`IL3050`/`IL2026` leak through and break the test's strict
warning-baseline check.

## Fix

Explicitly suppress with `#pragma` at the affected call site—the same
pattern used elsewhere in the codebase (`ResourceDictionaryHelpers.cs`,
etc.) for ILC warnings on code that is provably safe via a feature
guard:

```csharp
if (RuntimeFeature.IsHybridWebViewSupported)
{
    // NOTE: not registered under NativeAOT or TrimMode=Full scenarios.
    // IL2026/IL3050 suppressed because IsHybridWebViewSupported has [FeatureGuard] annotations
    // for both RequiresUnreferencedCode and RequiresDynamicCode. The Android NativeAOT ILC does
    // not honor [FeatureGuard] for warning suppression (unlike iOS/macCatalyst), so suppress explicitly.
#pragma warning disable IL2026, IL3050
    handlersCollection.AddHandler<HybridWebView, HybridWebViewHandler>();
#pragma warning restore IL2026, IL3050
}
```

No baseline changes needed—the pragma suppression is respected by the
ILC so the warnings are no longer emitted.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
…ide the Border (#30408)

<!-- 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 of the issue



- On Windows, when a ContentView with a clip applied during the
SizeChanged event is placed inside a Border, both the ContentView
(through WrapperView) and the Border's content (via ContentPanel)
attempt to apply their own clips to the same visual element.

- The clip set in the ContentPanel.UpdateClip method of the Border is
applied after the WrapperView has already set its clip, resulting in the
Border overwriting the clip geometry originally applied.



### Description of Change



- The fix introduces a condition in ContentPanel.UpdateClip that checks:
- Whether the content's visual already has a clip (visual.Clip is not
null)
- Whether the content is wrapped by a WrapperView (Content.Parent is
WrapperView)
- If both conditions are met, the ContentPanel skips applying its own
clip to the content, allowing the ContentView’s clip (set by the
WrapperView) to be preserved.



### Issues Fixed



Fixes #30404 



### Tested the behaviour in the following platforms



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



### Screenshot



| Before Issue Fix | After Issue Fix |
|----------|----------|
| <img
src="https://github.com/user-attachments/assets/04381895-5d99-4ac8-9a2e-7d35aaa03dd4">
| <img
src="https://github.com/user-attachments/assets/04938f65-5c0a-4a4b-9676-c34c3ac30378">
|
…nt Width (#35213)

<!-- 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 Details:

CollectionView's Header / Footer is not expanded to its content width in
iOS and Mac platform
       
### Root Cause:

In the iOS/MacCatalyst CollectionView2 implementation,
StructuredItemsViewController2 and GroupableItemsViewController2 both
have a GetViewForSupplementaryElement() method responsible for creating
header and footer views. When a TemplatedCell2 is dequeued as a
supplementary view, its ScrollDirection property was never set — it
silently defaulted to UICollectionViewScrollDirection.Vertical. This was
an oversight, because regular item cells in GetCell() already correctly
assigned ScrollDirection. The missing assignment fed through to
GetMeasureConstraints() in TemplatedCell2, which uses ScrollDirection to
decide how to constrain the cell during measurement: for a horizontal
grid, a Vertical direction incorrectly constrains the cell's width to
the estimated value (~30pt from LayoutFactory2) instead of leaving it
unconstrained, causing header/footer labels to be clipped to a tiny
width and become inaccessible in the UI tree.

### Description of Change:

The fix is a one-line addition in each of the two affected view
controllers, mirroring the pattern already used in GetCell(). In
StructuredItemsViewController2.GetViewForSupplementaryElement(),
templatedCell.ScrollDirection = ScrollDirection is set before calling
UpdateTemplatedSupplementaryView. The same line is added in
GroupableItemsViewController2.GetViewForSupplementaryElement() for group
header/footer cells. With ScrollDirection correctly propagated,
GetMeasureConstraints() leaves the width unconstrained for horizontal
grids, allowing headers and footers to self-size to their full content
width. Vertical layouts are unaffected since they already defaulted to
Vertical, and the change has no impact on Android or Windows as Items2
is iOS/MacCatalyst-only.

**Tested the behavior in the following platforms: **

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

### Reference:

N/A

### Issues Fixed:

Fixes #35113            

### Screenshots
| Before  | After  |
|---------|--------|
| <img width="400" height="500"
src="https://github.com/user-attachments/assets/319d97f0-a4b9-4b00-bc9a-670fd44fd86f"
/> | <img width="400" height="500" alt="After_31553"
src="https://github.com/user-attachments/assets/710a0fca-0c92-48fd-a91f-697d9e0d6b86"
/> |
…ible=false (#34621)

### Description

On Android, navigating from a page with the soft keyboard (IME) open to
a page with `Shell.NavBarIsVisible="False"` causes the destination page
to initially render under the status bar and then jump into the correct
position.

This behavior is more noticeable when the destination page performs
heavier UI work, and in some cases the layout may remain incorrectly
positioned.

### Root Cause

During `ShellRenderer.SwitchFragment`, the fragment transaction is
committed while the IME is still visible. Android continues to report
IME-related `WindowInsets`, causing the new layout to be measured with
incorrect top insets.

Once the IME state stabilizes, the layout is corrected, resulting in a
visible jump.

### Fix

Dismiss the soft keyboard before performing the fragment transaction:

- Detect IME visibility using `IsSoftInputShowing`
- Call `HideSoftInput()` prior to `FragmentTransaction`

This ensures that `WindowInsets` are stable before the new layout is
measured.

### Result

- Eliminates layout jump when navigating with keyboard open
- Ensures correct layout positioning from initial render
- Improves Shell navigation consistency on Android

### Testing

Added a UI test (`Issue34584`) that:

- Opens the keyboard by focusing an `Entry`
- Navigates to a page with `Shell.NavBarIsVisible="False"`
- Verifies that content is laid out below the status bar (`Y > 0`)

Note: The test validates final layout correctness, not visual animation.

### Related Issues

- Fixes #34584
- Related to #34060
… Shell (#35072)

<!-- 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:
#8296 - ContentPage.OnBackButtonPressed not invoked on iOS/MacCatalyst
when the native navigation bar back button is tapped inside a
NavigationPage.

#9095 - Shell.OnBackButtonPressed not invoked when the toolbar back
button is tapped on Android and iOS Shell pages

### Root Cause
#8296
- ShouldPopItem in NavigationRenderer.cs (the
navigationBar:shouldPopItem: UIKit delegate callback) fires when the
user taps the native iOS back button.
- Previously it unconditionally set _uiRequestedPop = true and returned
true, allowing the native pop without ever notifying MAUI's page model.
As a result, ContentPage.OnBackButtonPressed was never called on iOS
when the native back button was tapped inside a NavigationPage.

#9095 -  iOS (ShellSectionRenderer.cs)
- Same issue — tracker.Value.Page?.SendBackButtonPressed() skipped the
Shell chain and went directly to the ContentPage.

### Description of change

#8296  **NavigationRenderer.cs**
- In ShouldPopItem, call NavPage?.CurrentPage?.SendBackButtonPressed()
before allowing the native pop. If it returns true (the page
handled/cancelled back navigation), reset _uiRequestedPop and return
false to prevent the native pop.

#9095 **ShellSectionRenderer.cs** (iOS Shell)

- Route through _context.Shell?.SendBackButtonPressed() instead of
tracker.Value.Page?.SendBackButtonPressed(), so the Shell back button
tap goes through the same chain as the system back button.

**Note** on _sendPopPending = false in the BackButtonBehavior command
path: On iOS 26+, _sendPopPending is set to true unconditionally at the
start of SendPop(), before any BackButtonBehavior checks. When a
BackButtonBehavior.Command executes and returns false (preventing
navigation), ViewDidDisappear never fires — so without an explicit
reset, the flag stays true permanently and silently blocks all
subsequent back presses. The _sendPopPending = false after command
execution (line 188) is therefore an intentional and necessary fix to
prevent the back button becoming permanently unresponsive after a
command-handled back press on iOS 26+.

### Test results 
#### Shell — `OnBackButtonPressed` (fixes #9095)

| Platform | Navigation | `OnBackButtonPressed` |
|---|---|---|
| iOS / MacCatalyst | `GoToAsync` | ✅ Triggered |
| Android | `GoToAsync` | ✅ Triggered (app back button and emulator back
button) |
| Windows | `GoToAsync` | ✅ Triggered |

>`OnBackButtonPressed` is triggered for both the `Shell` and the
contained `ContentPage`.


#### NavigationPage — `OnBackButtonPressed` (fixes #8296)

| Platform | Navigation | `OnBackButtonPressed` | Notes |
|---|---|---|---|
| iOS / MacCatalyst | `PushAsync` | ✅ Triggered | |
| iOS / MacCatalyst | `PushModalAsync` | — | Back button not visible in
modal navigation |
| Android | `PushAsync` | ✅ Triggered (app back button and emulator back
button) | |
| Android | `PushModalAsync` | ✅ Triggered | Called on the modal
ContentPage |
| Windows | `PushAsync` | ✅ Triggered | |
| Windows | `PushModalAsync` | — | Back button not visible in modal
navigation |

> On Android and Windows, `OnBackButtonPressed` is triggered for both
the `NavigationPage` and the contained `ContentPage`.

#### TabbedPage — `OnBackButtonPressed`

| Platform | Navigation | `OnBackButtonPressed` | Notes |
|---|---|---|---|
| iOS / MacCatalyst | `PushAsync` | ✅ Triggered | |
| iOS / MacCatalyst | `PushModalAsync` | — | Back button not visible in
modal navigation |
| Android | `PushAsync` | ✅ Triggered | |
| Android | `PushModalAsync` | ✅ Triggered | |
| Windows | `PushAsync` | ✅ Triggered | |
| Windows | `PushModalAsync` | — | Back button not visible in modal
navigation |

#### FlyoutPage — `OnBackButtonPressed`

| Platform | Navigation | `OnBackButtonPressed` | Notes |
|---|---|---|---|
| iOS / MacCatalyst | `PushAsync` | ✅ Triggered | |
| iOS / MacCatalyst | `PushModalAsync` | — | Back button not visible in
modal navigation |
| Android | `PushAsync` | ✅ Triggered | |
| Android | `PushModalAsync` | ✅ Triggered | |
| Windows | `PushAsync` | ✅ Triggered | |
| Windows | `PushModalAsync` | — | Back button not visible in modal
navigation |


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

### Issue Fixes
Fixes #8296 

### Screenshots
|  | Before  | After |
|--|---------|--------|
|8296|  <video
src="https://github.com/user-attachments/assets/13887369-e9e9-42df-a2a0-db88f0e6b38f">
|   <video
src="https://github.com/user-attachments/assets/d0ccfb01-59e8-44bc-8878-54c5d0f6fb7e"> 
|
|9095 |  <video
src="https://github.com/user-attachments/assets/664e0b7f-3964-4a1b-a4f6-46b1db758b48">
|   <video
src="https://github.com/user-attachments/assets/3ff159ec-93b0-4a91-854a-ca23211ff204"> 
|

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s changed to default value (#35215)

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

<!-- 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 iOS/MacCatalyst, dynamically changing IndicatorView.IndicatorSize
back to the default value (6) at runtime has no visual effect —
indicators remain stuck at the previously set non-default size.

### Root Cause
The platform control has a hard-coded early return when the indicator
size equals the default value, which skips resetting the visual
transform even when indicators are currently scaled to a different size.
Additionally, the field tracking the last applied size was initialized
to -1 instead of the actual default.

### Description of Change
Replaced the hard-coded default value check with a comparison against
the last applied size, so the update is only skipped when the size is
truly unchanged. Initialized the tracking field to the default size to
correctly represent the initial state.
 

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

### Output  ScreenShot

|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/30f6d250-1a65-4061-986f-16d3940ac243"
>| <video
src="https://github.com/user-attachments/assets/759cc5af-9f5f-4d95-8b2a-262499928d0d">|
…ent) IsEnabled changed. (#31540)

### Issue Details:

The user has defined an implicit style for the BackgroundColor property
of a Grid, with the selected state value set to green. However, when the
IsEnabled property of the CollectionView's parent Grid is changed from
false to true immediately on the button click, the background color of
the currently selected item (which is also a Grid) is lost.
        
### Root Cause:

This happens because changing the IsEnabled property triggers the
ChangeVisualState() method in the base VisualElement class. As a result,
the visual state transitions to "Normal", overriding the previously
applied "Selected" state and its associated background color.

### Description of Change:

To address the issue, a selection check has been added to ensure that
the "Normal" state is not forced when the element is currently in the
"Selected" state. This change preserves the visual appearance of
selected items by preventing the "Selected" state from being overridden
during IsEnabled property changes.

**Tested the behavior in the following platforms.**

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

### Reference:

N/A

### Issues Fixed:

Fixes  #20615 

### Screenshots
| Before  | After  |
|---------|--------|
| <Video
src="https://github.com/user-attachments/assets/14ead580-bb70-4779-8c6e-00c8e7e1d425"
Width="300" Height="600"> | <Video
src="https://github.com/user-attachments/assets/d5699514-40e7-417b-b0c6-d22ebc101a91"
Width="300" Height="600"> |

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
### Description of Change

Fixed a small typo in Clipboard.shared.cs. Nothing exciting, really.

### Issues Fixed

Given that this is an extremely small typo fix only, I thought I'd just
go ahead and file a PR.

---------
<!-- 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!
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

This pull request fixes a regression where LinearGradientBrush with
transparent stops rendered as opaque black boxes on Android starting in
10.0.60. The fix preserves per-stop alpha values so gradients render
correctly.

### Root Cause : 

- Introduced by #31567 (Android drawable perf), which rewrote
MauiDrawable.Android.cs to use a Java-side PlatformDrawable.
- In that refactor, calls to GetGradientData were written as
GetGradientData(1.0f), which forces every gradient stop's alpha to fully
opaque (255), overriding any Transparent stop colors defined by the
developer.
  
### Description of Change
**Bug fix: Gradient transparency on Android**

* Updated `MauiDrawable.Android.cs` so that both linear and radial
gradient paints now call `GetGradientData(null)` instead of
`GetGradientData(1.0f)`, preserving per-stop alpha values for
backgrounds and borders. This prevents gradients with transparent stops
from rendering as solid black.
[[1]](diffhunk://#diff-9962b2ab4d4a0eb4922307e668bfe7d868c4fac7919a9463a3cba1859a6de86fL115-R115)
[[2]](diffhunk://#diff-9962b2ab4d4a0eb4922307e668bfe7d868c4fac7919a9463a3cba1859a6de86fL129-R129)
[[3]](diffhunk://#diff-9962b2ab4d4a0eb4922307e668bfe7d868c4fac7919a9463a3cba1859a6de86fL250-R250)
[[4]](diffhunk://#diff-9962b2ab4d4a0eb4922307e668bfe7d868c4fac7919a9463a3cba1859a6de86fL264-R264)

**Testing: New test case and UI test**

* Added a new issue test page `Issue35280` that displays an image with a
linear gradient overlay fading from black to transparent, to visually
confirm the fix.
* Introduced a corresponding UI test in `Issue35280.cs` to verify that
the gradient overlay is rendered correctly and not as an opaque black
box.

<!-- 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 #35280 
### Tested the behavior in the following platforms

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

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <img width="1080" height="1920" alt="Screenshot_1777904296"
src="https://github.com/user-attachments/assets/a3ed29f1-9f85-44e7-9d4a-14e343aa8bda"
/> | <img width="1080" height="1920" alt="Screenshot_1777904172"
src="https://github.com/user-attachments/assets/c1f4be01-7af1-4e68-a36b-766ef167062f"
/> |
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
…acing is applied (#35309)

> [!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 Details
On iOS, when an Editor has CharacterSpacing applied through a Slider,
the Editor becomes scrollable once the content exceeds its frame size.
After rotating the device (portrait → landscape → portrait), the Editor
loses scrollability because a re-measurement cascade expands it to the
full content height.

**Regression PR:** #30629
 
### Root Cause
PR #30629 added ValidateSafeArea() to MauiView.LayoutSubviews, which
calls InvalidateConstraintsCache() during rotation. This clears the
measurement cache (_lastMeasuredSize = null), causing HasBeenMeasured()
= false and needsMeasure = true for Pages.
As a result, a full re-measurement cascade occurs, where the Editor is
measured with infinite height. SizeThatFits then returns the full
content height (for example, 134px), causing the Editor to grow to fit
its content and lose its scrollable behavior.
 
### Description of Change
Updated EditorHandler.GetDesiredSize to cap the measured height to the
current frame height when the Editor content exceeds its frame
(scrollable state).
An AllowAutoGrowth flag was added to MauiTextView so Editors using
AutoSize = TextChanges are excluded from the cap and can continue
growing to fit their content.

### Issues Fixed
Fixes #35114

### Screenshots

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video width="300" height="600"
src="https://github.com/user-attachments/assets/4f1b08f7-abb2-40ae-84d8-f05cd063339c">
| <video width="300" height="600"
src="https://github.com/user-attachments/assets/42850642-087c-4198-91be-fc9b09b8dd43">
|
…ker.FocusChange (#29939)

Check if _editText is null before detaching the event.
)

<!-- 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
VisualStateManager permanently breaks when attempting to set a control's
Style property during state transitions. When properties like IsEnabled
change, VSM automatically transitions states - but if that state
contains a Style setter, the control loses all VSM functionality and can
no longer respond to any state changes.

### Root Cause
The old code set the Style property by replacing the entire Style
object. This removed the original Style that contained the
VisualStateGroups attached property. Once the VSM attachment is lost,
the control cannot transition to other states - VSM is permanently
broken for that control.

### Description of Change
Added special handling when Setter values are Styles, using the
IStyle.Apply() and IStyle.UnApply() methods. Apply() applies the Style's
individual setters without replacing the Style property, keeping the VSM
connection intact. UnApply() properly removes the Style's setters when
the state changes, preventing conflicts between different states.

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

### Output  ScreenShot

|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/a5a2a482-73a2-4e84-a133-afacaf1c3872"
>| <video
src="https://github.com/user-attachments/assets/a1079f90-06cb-4083-8202-2517200b5346">|
…35208)

> [!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 details
When a virtual XAML event handler is wired inside a DataTemplate (for
example, SwipeItem.Invoked) and the handler is defined in a base class
and overridden in a derived class, the app crashes in Release builds on
iOS/macOS and may also behave incorrectly on Android. This occurs due to
a bug in XamlC's IL code generator (SetPropertiesVisitor.cs), where the
ldvirtftn instruction receives the wrong vtable object (the anonymous
DataTemplate class instead of the root XAML element), causing runtime
failure with Full AOT compilation.

### Root Cause

The issue occurs because of incorrect IL generation in
SetPropertiesVisitor.ConnectEvent() when wiring a virtual event handler
inside a DataTemplate.

When XamlC compiles a DataTemplate, it generates an anonymous nested
class (e.g., <InitializeComponent>_anonXamlCDataTemplate_1) with a
LoadDataTemplate() method where event wiring happens. For virtual
handlers, XamlC must emit ldvirtftn, which requires the actual page
object as the vtable source to resolve the correct overridden method.

The bug was that the code always pushed Ldarg_0 as the vtable object.
Inside LoadDataTemplate(), Ldarg_0 is the anonymous class, not the root
page. This causes ldvirtftn to look up the virtual method on the wrong
vtable, so the override on the generic subclass is never found. On iOS
Full AOT, this causes a hard crash; on Android and Windows, the JIT
silently calls the base class method instead of the override.
 
### Description of Change

The fix involves replacing the extra Ldarg_0 push before ldvirtftn with
a Dup instruction, which reuses the delegate target object that is
already correctly loaded on the stack just above this code.

The delegate target (the root page) is already on the stack, correctly
resolved via context.Root for both the top-level and DataTemplate
contexts. Dup copies that same object for ldvirtftn, ensuring virtual
dispatch always targets the actual page's vtable, and the overridden
method on the generic subclass is found correctly on all platforms.
 
**Windows platform behavior:**
 
The issue does not occur on the Windows platform. Based on analysis,
even though Windows does not crash, the behavior before the fix was
technically undefined, as it relied on the JIT being lenient. If the
method resolution happened to pick the base class version instead of the
override, the logic would silently be incorrect without any error. The
fix makes the IL correct and explicit for all platforms.

Tested the behavior in the following platforms.
 
- [x] iOS
- [x] Mac
- [ ] Android
- [ ] Windows

### Issues Fixed

Fixes #18055

### Output

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video width="270" height="600"
src="https://github.com/user-attachments/assets/6bc99f45-7114-4ce5-9a75-d98d3c014882">
| <video width="270" height="600"
src="https://github.com/user-attachments/assets/00cd3e91-cb1b-4a9a-9df9-1a2538d2ec56">
|
…ding (#34845)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
When set IsRefreshing = true in navigated page, refreshview is not
visible

### Root Cause
OnLoaded unsubscribed itself after firing once (refreshControl.Loaded -=
OnLoaded). So when the user navigated
back to the page, the Loaded event fired again but had no handler —
UpdateIsRefreshing() was never called, and
the refresh indicator never appeared.

### Description of Change

<!-- Enter description of the fix in this section -->
Removed Self-unsubscribe line refreshControl.Loaded -= OnLoaded so the
handler stays active across.

### 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 #30535 

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

**Tested the behavior in the following platforms.**
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **Windows**<br> <video
src="https://github.com/user-attachments/assets/408e35ed-61ed-4ad2-9104-f08635c98af2"
width="600" height="300"> | **Windows**<br> <video
src="https://github.com/user-attachments/assets/c16e311b-44c0-4571-af71-b3fa316fbea2"
width="600" height="300"> |
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

<!-- 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
Build fails with InvalidOperationException when using an empty (but
valid) SVG as the app icon. The SVG has width, height, and viewBox but
no drawn shapes inside.

### Root Cause
PR #33194 moved the size.IsEmpty check to run before both code paths in
DrawUnscaled, but size (from CullRect) is only needed in the downscale
path. Empty SVGs have a zero CullRect even with valid declared
dimensions, so the check incorrectly blocks the upscale path that never
uses size.

### Description of Change
Moved the size.IsEmpty check from before both branches into only the
else (downscale) branch where size is actually used. The scale >= 1 path
calls DrawPicture directly, which harmlessly draws nothing for empty
SVGs, producing a valid transparent image.
 

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

### Output  ScreenShot

|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5"
>| <video
src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
#32674)

<!-- 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:

The FlowDirection property is not being applied to the EmptyView content
within a CollectionView.

### Root Cause
FlowDirection was not applied correctly to EmptyView because
EffectiveUserInterfaceLayoutDirection
returned incorrect values, causing RTL detection logic to fail. After
using the correct
property to update the isRTL boolean, the flip logic produced inverted
visuals and did not properly
propagate FlowDirection changes.

### Description of Change

- Replaced transform-based RTL handling with proper FlowDirection
propagation using the MAUI ItemsView.FlowDirection.
- For View-based and DataTemplate-based EmptyViews, the old
transform-based RTL handling was removed. The platform view now updates
its layout direction through UpdateFlowDirection().
- For string-based EmptyViews rendered as a UILabel, the text alignment
is set to center to provide a better user experience.

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

### Issues Fixed:

Fixes #32404 
Fixes #34522

### Screenshots
| Before  | After |
|---------|--------|
|  <video
src="https://github.com/user-attachments/assets/6423b8a9-8861-4a11-b825-00b4efa28fbb">
|   <video
src="https://github.com/user-attachments/assets/1c851a9b-e772-45ea-8fd5-485e081e53ed"> 
|
…g background (#34997)

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

<!-- 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 Android, switching from a gradient to a solid color is not worked —
the gradient persists visually.
On Windows, gradients are never applied, and setting Background to null
doesn't clear previously applied colors.

### Root Cause
On Android, BorderDrawable.SetBackground() doesn't clear the gradient
shader when switching to a solid color or null — the stale shader
persists on the underlying paint object.

On Windows,
[UpdateBackground()](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html)
only handled
[SolidPaint](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html),
so gradients were ignored and null backgrounds didn't trigger resource
cleanup.

### Description of Change
On Android, clear the shader via platformPaint.SetShader(null) in
BorderDrawable.SetBackground() before applying the solid color.
On Windows, use
[button.Background?.ToPlatform()](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html)
to handle all paint types and allow null to remove theme overrides.
Ensure
[RefreshThemeResources()](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html)
always executes.

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

### Output  ScreenShot
Android
|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/a48e6fd4-46df-443e-90bf-c2ce41b3a000"
>| <video
src="https://github.com/user-attachments/assets/575b452a-9b68-4568-a5ec-ea14acce17c4">|


Windows
|Before|After|
|--|--|
| <video
src="https://github.com/user-attachments/assets/0b10cb79-2910-42ad-94e7-ef64283a8dc2"
>| <video
src="https://github.com/user-attachments/assets/74d41e8d-3734-4374-b7b7-b6e668234dfb">|
…Android in .NET 10 (#35295)

> [!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 details
On Android (.NET MAUI 10), Shell toolbar colors are applied before
navigation completes during tab/page transitions, causing the current
page to briefly display the destination page’s colors. This is a
regression from .NET MAUI 9 and results in incorrect visual behavior
during navigation.

### Root Cause
The issue occurs because of the toolbar appearance update being
triggered before the tab navigation is fully completed when switching
tabs in a Shell with TabBar. During the tab change, the destination tab
colors are applied immediately while the previous tab content is still
visible on screen, which causes a brief color flash. This is especially
noticeable when different child pages use different toolbar colors. The
behavior started after an earlier change where the appearance update was
added during tab switching but executed before the section change was
committed.
 
### Description of Change
The fix involves changing the execution order so the section change is
committed first, and the appearance update happens only after the tab
switch is successfully accepted. This ensures the Shell internal state
is updated to the correct tab before applying the toolbar colors,
preventing premature color changes while the previous tab is still
visible. The update is also skipped when the tab switch is rejected or
cancelled, so colors continue to refresh correctly on every tab switch,
but now at the correct time.

### Why Tests were not added:

**Regarding the test case:** No automated test case was added for this
fix, as the issue is a brief visual color flash that occurs during the
tab-switch animation on Android and cannot be reliably captured through
the existing automated test infrastructure.
 
Screenshot-based tests cannot consistently capture the exact transition
frame where the issue occurs, and the current baseline comparison
approach is unable to accurately differentiate correct and incorrect
toolbar color timing during the animation.

Tested the behavior in the following platforms.
 
- [x] Android
- [ ] Mac
- [ ] iOS
- [ ] Windows

**Regression PR:** The PR
[25870](#25870) as the primary
regression source. PR [32882](#32882)
appears to be a later overlapping change affecting Shell color timing.

The PR [25870](#25870) as the primary
regression source. PR [32882](#32882)
appears to be a later overlapping change affecting Shell color timing.

### Issues Fixed

Fixes #35060

### Output

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video width="270" height="600"
src="https://github.com/user-attachments/assets/44ea19d0-7aca-42b1-b936-506eb4609f33">
| <video width="270" height="600"
src="https://github.com/user-attachments/assets/f1c8b6b4-44b5-4f6b-9daa-988daa33b90c">
|
Appears to be unused, but trips up analyzers when investigating other
issues.

Fixes: xamarin/Xamarin.Forms#1749

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

### Issue Details
In FlyoutPage, RTL FlowDirection is not working properly at initial and
runtime changes.

### Description of Changes
* Added an `UpdateFlowDirection` method to set the correct
`SemanticContentAttribute` on the root view, child controller views, and
navigation bar, ensuring proper mirroring for RTL layouts and correct
inheritance by child handlers.
* Updated property change handling to listen for `FlowDirection` changes
and trigger both `UpdateFlowDirection` and `UpdateLeftBarButton` when
flow direction is updated at runtime.
* Called `UpdateFlowDirection` during gesture recognizer setup to ensure
the correct flow direction is applied during initialization.

### 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 #34830 

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

**Tested the behavior in the following platforms.**
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/f9a9cc1a-3320-4e8b-9c6c-3702c585b5c2"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/7da0ba09-557f-46bd-81b7-2fed1295b61d"
width="300" height="600"> |
…dler disconnect (#35314)

> [!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

Fixes #27101.

When a `Page` is navigated away from on Windows, the focused control's
handler is disconnected.
`ElementHandler.IElementHandler.DisconnectHandler()` (in
`src/Core/src/Handlers/Element/ElementHandler.cs`) sets `PlatformView =
null` **before** running the platform-specific disconnect chain.

On Windows, that chain calls `UpdateIsFocused(false)`
(`src/Core/src/Handlers/View/ViewHandler.Windows.cs`), which then sets
`virtualView.IsFocused = false`. That property change cascades through:

```
BindableObject.SetValue
  → OnIsFocusedPropertyChanged
    → ChangeVisualState
      → VisualStateManager.GoToState
        → Setter.Apply (e.g. background color)
          → BindableObject.SetValue (mapped property)
            → Handler.UpdateValue("Background")
              → Property mapper
                → handler.PlatformView ← throws "PlatformView cannot be null here"
```

The strongly-typed `PlatformView` accessor (`ViewHandlerOfT.cs`,
`ElementHandlerOfT.cs`) throws `InvalidOperationException("PlatformView
cannot be null here")` because we already nulled it.

### Fix

Introduce a new `Disconnecting` state on `ElementHandlerState` and set
it for the duration of `DisconnectHandler(oldPlatformView)`.
`ElementHandler.UpdateValue` short-circuits when the handler is in that
state, so property fan-outs during teardown no longer hit the mapper
(and therefore no longer touch the released platform view).

The state is restored in a `finally` block so a throwing platform
disconnect cannot leave the handler stuck in `Disconnecting`.

Logical state on the `BindableObject` itself still gets updated by VSM
setters (so reused/rebound elements remain correct — when a recycled
element is reconnected, `SetVirtualView` re-pushes all current property
values via `_mapper.UpdateProperties`).

### Why fix here, not in `VisualElement.ChangeVisualState()` (or
`Page.cs`)?

Several controls override `ChangeVisualState()` and call
`VisualStateManager.GoToState` directly, bypassing the base
implementation (`Button`, `ImageButton`, `CheckBox`, `RadioButton`,
`Switch`). Guarding in `ChangeVisualState` would miss those paths, and a
naive `Handler is null` check would also regress legitimate pre-handler
XAML init scenarios (`VisualStateGroupsPropertyChanged`,
`VisualStateGroupList.OnStatesChanged`).

`ElementHandler.UpdateValue` is the central choke point that all
property cascades flow through, so the guard there:
- covers every code path on every platform,
- still lets VSM logical state settle on the `BindableObject`,
- requires no changes in any control-specific override.

### Tests

- **Unit test**:
`Microsoft.Maui.UnitTests.AbstractViewHandlerTests.UpdateValueIsSkippedWhileHandlerIsDisconnecting`
simulates the property fan-out from inside `DisconnectHandler` and
asserts the mapper is not invoked. Verified that the test fails on the
unmodified code (mapper count goes from 0 to 1) and passes after the
fix.
- **UI test**:
`Microsoft.Maui.TestCases.Tests.Issues.Issue27101.NoCrashWhenNavigatingBackFromPageWithFocusedButton`
repeatedly navigates a `NavigationPage` containing a focused `Button`
styled with VSM (Normal/Focused/Disabled/PointerOver/Pressed) to surface
the focus race.

### Relation to #27877

This PR supersedes #27877. That PR wrapped the post-disconnect
`ChangeVisualState` call in `try { ... } catch (ObjectDisposedException)
{ }` inside `Page.cs`. Two issues with that approach:
1. The actual exception thrown is `InvalidOperationException`, not
`ObjectDisposedException`, so the catch likely never fires for the
reported scenario (matches the unanswered review feedback from MartyIX
on 2025‑05‑30).
2. Even with the right exception type, that's a band-aid: it lets the
failing call happen, swallows the symptom, and only patches one of many
code paths that could trip the same issue (any subclass that triggers a
property change during disconnect).

### Issues Fixed

Fixes #27101
Supersedes #27877

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@kubaflo

kubaflo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

I checked the exact synthetic merge SHA 30af7821a2e7387ba6fb4e9e36695919e3906894 locally and against the current CI runs.

Verdict: not ready to merge yet. The parent pipelines are still running, but required build legs have already failed and cannot turn green.

  • Local dotnet cake fails with exit code 1 in dotnet-pack-maui: 11 CS8632 errors in src/Essentials/src/Screenshot/Screenshot.android.cs. The incoming change adds file-level #nullable enable, but the existing inner #nullable restore disables annotations again for the remainder of the file.
  • maui-pr build 1523187: all four macOS/Windows build legs fail restore. XHarness 11.0.0-prerelease.26064.3 requires xUnit 2.9.3, while this merge retains xUnit 2.9.0. The exact net11.0 parent build 1522176 was green, so this is PR-caused.
  • maui-pr-devicetests build 1523189 completed failed: Mono, CoreCLR, and Windows builds all fail before device tests run, primarily from the same xUnit/XHarness conflict.
  • maui-pr-uitests build 1523188: Windows sample builds pass, but CoreCLR/Android and Material3 sample builds fail on the Screenshot.android.cs compiler errors, so full UI coverage cannot run.
  • The previous maui-pr attempt on the same SHA also had deterministic Android NativeAOT failures on both macOS and Windows: IL2026 from RefreshViewWebViewScrollCapture.ScrollCaptureState.SetCanScrollUp introduced by [Android] Fix for RefreshView triggering pull-to-refresh when scrolling inside a WebView with internal scrollable content #34614.

Build Analysis has no known-issue matches for these failures.

<!-- 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!

Fixes the compilation and restore blockers found in #36733. This
intentionally does not address unrelated failing tests.

## Changes

- Keep nullable annotations enabled throughout `Screenshot.android.cs`,
fixing the Android `CS8632` compiler errors.
- Align xUnit packages and analyzers with the `2.9.3` dependencies
required by the XHarness package, fixing the `NU1107`, `NU1605`, and
`NU1608` restore failures.

## Validation

- `dotnet cake` completes successfully with zero errors.
- The CI-style macOS solution build no longer reports the xUnit/XHarness
restore conflicts or `Screenshot.android.cs` compiler errors. The local
run proceeds until the machine-specific Xcode 26.6 SDK requirement
(`MT0180`).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c5263b3e-4e79-4368-9e21-230fe5981d54
@kubaflo

kubaflo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@kubaflo

kubaflo commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

PR #36733 merge-readiness assessment

Assessed head 8716e51 against net11.0 c887d05 and main ee21c93. No code was committed or pushed.

Overall Not ready Failures 76 Baseline 1 on base Platform Cross platform

Verdict: Not ready - click to expand

Overall verdict: Not ready

The disposable merge candidate completes the full default dotnet cake --verbosity=diagnostic build and pack successfully (14m45s), so it can compile locally. That is not enough to merge: GitHub still reports the PR as conflicting, the required maui-pr build 1523618 is red, the focused AppTheme failure reproduces locally, and device/UI CI contains cross-platform regressions.

Coverage: 154 checks · 131 passing/neutral · 22 failing · 1 pending · 2 unmapped failing checks · 24 unexplained build legs · 1 aborted check · 3 device-test checks not positively verified by the automated gatherer · 64 unattributed failures · 11 regressed-vs-base. Deterministic ceiling: Not ready.

Merge conflicts

GitHub reports CONFLICTING / DIRTY. Merging the current PR head into the current net11.0 target has one textual conflict:

File Disposable resolution
src/Controls/tests/DeviceTests/Elements/Border/BorderTests.Windows.cs Preserve both independent groups: the net11.0 keyboard/TapGestureRecognizer tests and the incoming Border sizing/automation-peer tests.

The scratch resolution has no remaining unmerged paths or conflict markers. It was not committed or pushed.

There are also two semantic merge conflicts that Git did not flag:

  • AppTheme: the target branch's lazy resource-key path advertises __MAUI_ApplicationTheme__, but its resolver does not return Application.RequestedTheme for that key.
  • HybridWebView: the merged handler emits InvokeJavaScriptAsync threw..., while the imported main tests expect InvokeJavaScript threw....

Highest priority: maui-pr

Evidence Verdict Reason
Full local Cake build + pack Pass Default dotnet and dotnet-pack targets completed successfully.
ParentSetResolvesAppThemeDynamicResourceWithoutListener Likely PR-caused blocker Fails on Windows and macOS Helix and reproduces locally: expected Light, actual Unspecified. The merged resource-key/resolver mismatch above explains the failure.
CanConfigureAppConfiguration Needs investigation ObjectDisposedException from a disposed ThreadLocal<IDispatcher>. Recent base unit-test legs passed, but causality is not yet proven. A required test failure still blocks until fixed or rerun cleanly.
NativeAOT Blocker confirmed; local runner also has a tooling failure Earlier build 1522471 failed the same four Android AOT cases on both macOS and Windows because IL2026 appeared as an unexpected ILC warning for RefreshViewWebViewScrollCapture.ScrollCaptureState.SetCanScrollUp. The local AOT run emits that exact warning again. Its final 14/18 result is additionally obscured by a StructuredLogger ArgumentNullException while reading current binlogs, which is a separate test-tooling failure.
JDK/Android SDK provisioning and macOS agent disconnect Likely unrelated infrastructure MSB3923 reports a truncated download, Android provisioning could not find platform-tools;35.0.2, and the macOS AOT agent disconnected. These individual failures look environmental, but they prevented an authoritative green run and therefore require a clean rerun.

maui-pr is the deciding gate here: it is not green, one AOT check remains in progress, and the locally reproduced AppTheme failure is a real blocker.

Device tests

maui-pr-devicetests build 1523620 repeats the same six HybridWebView assertions on Android CoreCLR/Mono, iOS CoreCLR/Mono, MacCatalyst, and Windows packaged/unpackaged:

Expected: InvokeJavaScript threw...
Actual: InvokeJavaScriptAsync threw...

This is a direct merged-source/test mismatch, not infrastructure. The recent net11.0 base build 1524581 was positively checked through all nine Helix jobs: every job finished, every work-item set was complete, and every work item had exit code 0. Verdict: likely PR-caused blocker.

UI tests

maui-pr-uitests build 1523619 has eight deterministic regressions whose same legs were green in all five sampled base runs:

  • MacCatalyst ListView: Bugzilla57910Test, SettingSourceWhenDetachedDoesNotCrash, Issue1939Test
  • Android Material3: VerifyMaterial3Button_SetFontAttributesAndText, TopTabUnselectedTextVisibleWhenSwitchingTabs
  • iOS: UpdateOnTabShouldWork, PickerKeepsCharacterSpacingAfterSelectingItem
  • WinUI CV1 result publication

There are another 23 unresolved CollectionView failures across Android, iOS, MacCatalyst, and Windows. The MacCatalyst CollectionView check was canceled after the 180-minute limit. Recent base UI pipelines are also red, but none of the extracted PR failures had an exact test/platform/reason match on the sampled base builds. Verdict: blockers until fixed or rerun with exact baseline evidence.

Other required checks and compliance

  • Validate (PR) fails five release-readiness assertions: no in-flight SR anchor, the net11 shipped preview tag still indicates preview5, two net11 trackers exist, two preview trackers exist, and the preview6 tracker is missing.
  • Build Analysis matched no open known-build-error rule, so none of the current failures can be waived on that basis.
  • The automated title, main to net11.0 branches, and merge-commit instruction are correct.
  • The PR body does not describe the branch-specific restore/nullable fixes in 8716e51, and the repository-required dogfood note is not in the body (a separate bot comment exists).
  • Generated cgmanifest.json / templatestrings.json files are not present in the actual PR diff.
  • Review decision remains REVIEW_REQUIRED.

Required before merge

  1. Refresh the PR branch and resolve the Border conflict while preserving both test groups.
  2. Reconcile the AppTheme resource resolver and HybridWebView exception-message test/implementation mismatches.
  3. Resolve the reproduced NativeAOT IL2026, then obtain a fresh fully green maui-pr.
  4. Rerun device and UI pipelines; the cross-platform HybridWebView failures and deterministic UI regressions cannot be waived as infrastructure.
  5. Update the PR body with the required note and the branch-specific fixes/validation.

Resolve the Border device test conflict by preserving both the incoming keyboard-focus coverage and the existing sizing and automation coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 923e744a-f52b-46ce-939e-b6d27d4f5287
@PureWeen

Copy link
Copy Markdown
Member

/azp run maui-pr-uitests

@PureWeen

Copy link
Copy Markdown
Member

/azp run maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kubaflo

kubaflo commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

PR #36733 recheck

Rechecked head 9f54fee against net11.0 c887d05. No code was committed or pushed.

Overall Not ready Failures 75 Baseline 1 on base Platform Cross platform

Verdict: Not ready - click to expand

Overall verdict: Not ready

The prior Border conflict is resolved and GitHub now reports MERGEABLE. The current synthetic merge 81109dd also completes the full default dotnet cake --verbosity=diagnostic build and pack locally in 14m28s. It is still not safe to merge: required maui-pr, device, UI, and validation checks are red, and the AppTheme failure reproduces locally.

Coverage: 154 checks · 132 passing/neutral · 22 failing · 0 pending · 2 unmapped failing checks · 18 unexplained failed legs · 3 device-test build checks not positively verified · 64 unattributed failures · 11 regressed-vs-base. Deterministic ceiling: Not ready.

What improved

  • The textual merge conflict is fixed.
  • The previous CanConfigureAppConfiguration, MacCatalyst ListView, and iOS UpdateOnTabShouldWork failures are gone.
  • All checks have completed; there are no pending checks.

Remaining blockers

Area Verdict Evidence
maui-pr 1525227: AppTheme Likely PR-caused ParentSetResolvesAppThemeDynamicResourceWithoutListener still fails on Windows and macOS Helix and locally, 1/1: expected Light, actual Unspecified. The merged lazy resource-key path exposes __MAUI_ApplicationTheme__, but TryGetResource does not resolve that synthetic key.
maui-pr: NativeAOT Likely PR-caused The same four Android AOT cases fail on both macOS and Windows: unexpected IL2026 for RefreshViewWebViewScrollCapture.ScrollCaptureState.SetCanScrollUp; each run ends 4 failed / 14 passed.
maui-pr: Windows Release Likely unrelated infrastructure, rerun required MSB4024 reports .buildtasks/.../Microsoft.Maui.Core.props was locked by another process. This has a concrete transient file-lock signature, but the required leg remains red until a clean rerun. Android SDK provisioning failures are similarly environmental/flaky-on-base and are not the reason for the blocker verdict.
maui-pr-devicetests 1525228 Likely PR-caused The same six HybridWebView exception assertions fail across Android Mono/CoreCLR, iOS Mono/CoreCLR, MacCatalyst, and Windows: tests expect InvokeJavaScript threw..., while the merged handler emits InvokeJavaScriptAsync threw.... All nine PR Helix run jobs have failed work items. By contrast, net11.0 build 1524581 was positively rechecked: all nine jobs finished, all 81 reported work items finished, and every exit code was 0. Several PR work items also crashed or timed out after reporting the failures, so the run is incomplete.
maui-pr-uitests 1525229 Not ready Five substantive new failures persist after retry: Android Material3 VerifyMaterial3Button_SetFontAttributesAndText crashes the app; TopTabUnselectedTextVisibleWhenSwitchingTabs has a visual mismatch; ShellContentShouldUpdateWhenContentPropertyChanges times out; and WinUI CV1 cannot find baselines for CollectionViewSelectedItemBackgroundLost or ItemShouldbeScrolledbasedOnGroupHeader. Their same legs were green in all five sampled base builds. Another 22 UI records remain indeterminate because their base legs are also red at different tests; 24 UI failure records retried and still failed.
Validate (PR) Likely workflow/live-state drift, still red The five assertions concern current release-tracker/tag counts rather than product code. Open follow-up #36760 updates this release-readiness logic and has a green current Validate (PR) job, which supports treating these as validation maintenance rather than a MAUI runtime regression. The required check still must pass.

Compliance and required action

  • Build Analysis found no open known-build-error match that would waive the remaining failures.
  • The automated title, main to net11.0 branches, and merge-commit instruction are correct.
  • The PR body remains automation boilerplate: it lacks the repository-required artifact-testing note and does not document the branch-specific merge fixes or validation.
  • Generated cgmanifest.json / templatestrings.json files are not in the PR diff.
  • Review is still required, and current main is faa6d91; Git ancestry shows five current-main commits absent from this head.

Before merge: fix the AppTheme semantic merge and NativeAOT warning, reconcile the HybridWebView test/implementation contract, resolve or rerun the substantive UI failures, refresh from current main, and obtain a fully green maui-pr plus clean device/UI/validation reruns.

@kubaflo

kubaflo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

maui-pr-only merge assessment

Rechecked head 9f54fee against current net11.0 c887d05. UI and device-test pipelines are intentionally excluded from this verdict. No code was committed or pushed.

Verdict: do not merge as-is. Three independent cross-model reviews reached the same conclusion after checking the source and maui-pr build 1525227.

The full synthetic merge builds and packs locally with default Cake, and several red items are dismissible infrastructure noise:

  • Windows MSB4024 is a transient file-lock signature.
  • platform-tools;35.0.2 warnings also occur in successful net11.0 jobs.
  • Latest net11.0 build 1524579 is red only because the macOS JDK download was truncated.

Two deterministic maui-pr failures remain:

  1. AppTheme semantic merge conflict

    • Adding only ParentSetResolvesAppThemeDynamicResourceWithoutListener to unchanged net11.0 reproduces Expected: Light / Actual: Unspecified.
    • That does not make the PR safe to merge: incoming main commit 9f9e11c is specifically the fix for this path.
    • The PR landed GetParentResourcesForParentSet() and its test, but lost the corresponding Element.SetParent call during the merge. The helper is currently unused, so the main-side behavioral fix was silently dropped.
  2. Android NativeAOT regression

    • The same four Android AOT cases fail on both macOS and Windows with unexpected IL2026 from RefreshViewWebViewScrollCapture.ScrollCaptureState.SetCanScrollUp.
    • This source is new to the merge and absent from current net11.0.
    • Recent branch evidence is clean: build 1523627 passed AOT 18/18 on macOS and 18/18 on Windows; build 1523174 did the same. Latest build 1524579 passed Windows AOT 18/18; its macOS AOT leg never ran because of the unrelated JDK failure.

The local Cake pass is useful compilation/packaging evidence, but it does not exercise these Controls unit and Android AOT failures.

Minimum safe merge condition: reconcile the AppTheme parent-resource paths so the incoming fix and test both land correctly, resolve or deliberately account for the new .NET 11 IL2026, then obtain a fresh green maui-pr. A rerun without code changes is expected to reproduce both failures.

<!-- 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

Merges the latest `main` commits into `merge/main-to-net11.0` so the
existing [`main` → `net11.0` merge PR
#36733](#36733) includes changes
landed after its current merge snapshot.

This specifically brings in
[#36773](#36773), which replaces the
Android `[Export]` bridge with the NativeAOT-safe AndroidNative
implementation and resolves the `IL2026` failures seen in #36733's
`maui-pr` run.

After this PR merges, `maui-pr` should be rerun on #36733.

### Issues Fixed

None.

---------
@kubaflo

kubaflo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kubaflo

kubaflo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Final maui-pr-only recheck

Scoped verdict: mergeable only if maintainers intentionally accept the remaining AppTheme failure. PR head is 1526fee.

The Android NativeAOT blocker is resolved after #36773:

  • Fresh maui-pr build 1526489 passed every NativeAOT leg on macOS and Windows.
  • Its Windows Release sample-build failure was isolated and did not reproduce.
  • Rerun maui-pr build 1526544 passed all 24 build, pack, and integration checks, including Windows Release and every AOT leg.

The rerun's only failure is ParentSetResolvesAppThemeDynamicResourceWithoutListener (Expected: Light, Actual: Unspecified) in the Controls Core unit-test work item on Windows and macOS, in both Debug and Release. No other failed test or build leg remains.

GitHub still reports the PR as BLOCKED because required maui-pr is red. If the AppTheme semantic merge loss is knowingly waived, there is no remaining compilation, packaging, integration, or NativeAOT blocker in maui-pr; merging requires a maintainer override.

@kubaflo
kubaflo merged commit 42884b3 into net11.0 Jul 25, 2026
39 of 43 checks passed
@kubaflo
kubaflo deleted the merge/main-to-net11.0 branch July 25, 2026 22:18
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Jul 25, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.