Skip to content

[iOS] Button: Fix text updates with CharacterSpacing - #36326

Merged
kubaflo merged 2 commits into
inflight/currentfrom
jfversluis-fix-ios-button-character-spacing-text
Jul 9, 2026
Merged

kubaflo merged 2 commits into
inflight/currentfrom
jfversluis-fix-ios-button-character-spacing-text

Conversation

@jfversluis

@jfversluis jfversluis commented Jul 3, 2026 •

Copy link
Copy Markdown
Member

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 from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

Controls replaces the core Button.Text mapper on iOS/MacCatalyst so it can handle Controls-specific behavior such as TextTransform and ContentLayout. That Controls mapper updated the native UIButton title but did not rebuild the attributed title used when CharacterSpacing is applied, so UIKit could continue displaying the previous CurrentAttributedTitle after Button.Text changed.

Description of Change

After Controls updates the native button text on iOS/MacCatalyst, it now reapplies the core button formatting mapper so the attributed title is rebuilt from the latest text.

The iOS Controls UIButton.UpdateText helper also keeps TitleLabel.Text synchronized with the transformed text for every text update. This gives UpdateCharacterSpacing the current text when it rebuilds the attributed title.

Key Technical Details

  • Button.iOS.cs now calls ButtonHandler.MapFormatting(handler, button) after UpdateText(button).
  • ButtonExtensions.UpdateText now assigns platformButton.TitleLabel.Text = text for all text updates, not only when the logical Button.Text is empty.
  • The regression test checks the native CurrentAttributedTitle text and kerning after Text changes with CharacterSpacing applied.

Edge Cases Covered

Scenario Coverage
CharacterSpacing + text update Device test and external repro
CharacterSpacing + ContentLayout + text update Device test and external repro
CharacterSpacing + TextTransform + text update Device test and external repro

@tdeborde2 @weases could you please try the PR artifacts when CI publishes them and confirm whether this resolves the issue in your apps?

Issues Fixed

Fixes #21488

Validation

  • Reproduced the issue with the external repro project from Button text does not update when CharacterSpacing is applied #21488 on .NET 10 / MAUI 10.0.80.
  • Verified the same repro passes when rebuilt against the fixed local MAUI artifacts, including CharacterSpacing, CharacterSpacing + ContentLayout, and CharacterSpacing + TextTransform cases.
  • Ran Controls Button device tests on MacCatalyst: 21/21 passed.
  • Built the iOS Controls device-test app successfully.

Reapply attributed formatting after Controls updates Button text on iOS and MacCatalyst so CharacterSpacing does not keep UIKit's attributed title on stale text. Keep the native title label synchronized with the transformed text before formatting is rebuilt.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 3, 2026 12:45
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36326

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36326"

@jfversluis jfversluis changed the title Fix iOS Button text updates with character spacing [iOS] Button: Fix text updates with CharacterSpacing Jul 3, 2026

Copilot AI 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.

Pull request overview

Fixes an iOS/MacCatalyst Controls Button.Text update bug when CharacterSpacing is applied, where UIKit could continue rendering the previous CurrentAttributedTitle after text changes.

Changes:

  • iOS Controls Button text mapper now reapplies attributed-string formatting after updating text.
  • iOS UIButton text update path now keeps TitleLabel.Text synchronized with the transformed text (ensuring subsequent attributed formatting rebuilds from the correct string).
  • Adds an iOS device test covering CharacterSpacing + Text updates (including ContentLayout and TextTransform scenarios).
Show a summary per file
File Description
src/Controls/src/Core/Button/Button.iOS.cs Updates MapText to reapply formatting after setting the native title, ensuring attributed titles are rebuilt on text changes.
src/Controls/src/Core/Platform/iOS/Extensions/ButtonExtensions.cs Synchronizes TitleLabel.Text with the transformed title to avoid stale native label state during re-measure/reformat.
src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.iOS.cs Adds device-test coverage verifying attributed title text + kerning update correctly when Text changes with CharacterSpacing.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@github-actions github-actions Bot added area-controls-button Button, ImageButton platform/ios platform/macos macOS / Mac Catalyst labels Jul 3, 2026
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jul 3, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

public static void MapText(IButtonHandler handler, Button button)
{
handler.PlatformView?.UpdateText(button);
ButtonHandler.MapFormatting(handler, button);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔍 AI-Generated Review (multi-model)

[moderate] Handler Mapper and Property Patterns — Reapplying formatting by calling ButtonHandler.MapFormatting(handler, button) directly bypasses the mapper chain for CharacterSpacing, so any app/library AppendToMapping/ModifyMapping customization registered for that property will not run when Text changes, even though this path is effectively refreshing the character-spacing-attributed title. Please route this dependent property refresh through the mapper, e.g. handler.UpdateValue(nameof(CharacterSpacing)), so custom mappings remain honored.

@MauiBot MauiBot added s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Jul 3, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jul 3, 2026
@kubaflo

kubaflo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

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

Refresh CharacterSpacing through the handler mapper chain when Button text changes so custom mapper extensions continue to run.

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

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@jfversluis — test-failure review results are available based on commit c143fe6.
To request a fresh review after new comments, commits, or CI runs, comment /review tests.

Overall Not ready Failures 21 Baseline 0 on base Platform iOS/macOS

Test Failure Review: Not ready - click to expand

Overall verdict: Not ready

5 failures are deterministic regressions vs the most recent green base build (maui-pr base 1491319 succeeded), including 2 actual test failures (Bugzilla43941Test and Issue26498TestNullException) and 3 cascading iOS simulator-run infra steps. None of the 21 distinct failures were confirmed pre-existing on the base branch; 16 remain unattributed; 1 check is still pending; 1 check was aborted (CANCELLED); and 7 green device-test checks could not be positively confirmed clean.

Coverage: 162 checks · 147 passing · 14 failing · 1 pending · 0 inaccessible · 1 unmapped · 21 unexplained build legs · 0 unaccounted failing checks · 1 aborted failing checks · 0 canceled-build checks · 7 device-test unverified · 16 unattributed · 5 regressed-vs-base. Deterministic ceiling: Not ready — 5 legs red on PR but green on base; 21 unexplained build legs; 16 unattributed failures; 1 pending check; 1 aborted failing check; 7 device-test unverified; 1 unmapped failing check.

Failure Verdict On base? Evidence
Install Simulator Runtimes - build error Likely PR-caused regressed deterministicAttribution=regressed-vs-base; leg succeeded on base build 1491320; ##[error]Bash exited with code 'null'; first step of a cascading iOS simulator install failure sequence
PublishTestResults - build error Likely PR-caused regressed deterministicAttribution=regressed-vs-base; leg succeeded on base; ##[error]No test result files matching; downstream cascade from simulator install failure
Publish Logs - build error Likely PR-caused regressed deterministicAttribution=regressed-vs-base; leg succeeded on base; ##[error]Path does not exist: /Users/cloudtest/vss/_work/1/s/artifacts/log/; downstream cascade from simulator install failure
Bugzilla43941Test Likely PR-caused regressed deterministicAttribution=regressed-vs-base; leg succeeded on base build 1491320; 2 occurrences; System.TimeoutException: Timed out waiting for element; no ci-scan match
Issue26498TestNullException Likely PR-caused regressed deterministicAttribution=regressed-vs-base; leg succeeded on base build 1491320; 2 occurrences; Failed [12s]; no ci-scan match
Run Helix Tests - build error Needs human investigation no Originally regressed-vs-base but demoted to indeterminate by ci-scan #36141 (recurring/leg on main); Helix work item failure in job 6d837778-3844-4764-bf1e-5f295b9738dc
to find package 'platform-tools;35.0.2' (windows) Needs human investigation no indeterminate; leg succeeded on base but held to indeterminate (env provisioning failure — nondeterministic); ci-scan match #36141 (recurring/leg); avdmanager exited with error
to find package 'platform-tools;35.0.2' (android) Needs human investigation no indeterminate; leg succeeded on base but held to indeterminate (env provisioning failure); ci-scan match #36141 (recurring/leg); 2 occurrences
to find package 'platform-tools;35.0.2' (unknown) Needs human investigation no indeterminate; leg succeeded on base but held to indeterminate (env provisioning failure); no ci-scan match
DeviceTestsWindows (Windows) - build error Needs human investigation no indeterminate; leg also red on base (legAlsoFailsOnBase=true — leg-level only, not exact-test dismissal); ##[error]PowerShell exited with code '1'
device-test work item incomplete (Controls.DeviceTests-packaged) Needs human investigation no indeterminate; Windows Helix work item timed out waiting for HybridWebView (480 s); crash dump present; 713 passed / 0 failed / 30 skipped but run incomplete; Helix work item
device-test work item incomplete (Controls.DeviceTests-unpackaged) Needs human investigation no indeterminate; Windows Helix work item timed out waiting for HybridWebView (480 s); crash dump present; 713 passed / 0 failed / 30 skipped but run incomplete; Helix work item
CookiesCorrectlyLoadWithMultipleWebViews Needs human investigation no indeterminate; leg absent on base (new/renamed leg); 4 occurrences; ci-scan match #36117 (recurring/test); System.TimeoutException: Failied on: 0
WebViewNoCrashPopup Needs human investigation no indeterminate; leg absent on base; 2 occurrences; ci-scan match #36037 (recurring/leg); app became unresponsive and was force-terminated
WebViewDoesntCrashWhenLoadingAHeavyPageAndUsingExecutionModeSeparateProcess Needs human investigation no indeterminate; leg absent on base; 2 occurrences; ci-scan match #36245 (recurring/test); app became unresponsive and was force-terminated
Issue1939Test Needs human investigation no indeterminate; originally regressed-vs-base but demoted by ci-scan #35957 (recurring/test on main); System.TimeoutException: Timed out waiting for element
MemoryLeakB42329 Needs human investigation no indeterminate; originally regressed-vs-base but demoted by ci-scan #35957 (recurring/test on main); System.TimeoutException: Timed out waiting for element
Publish the android_ui_tests_controls_30 test results - build error (x3) Needs human investigation no indeterminate; base outcome inconclusive (leg both passed and failed on base — flaky); ##[error]There are one or more test failures detected in result files; 3 occurrences across distinct Android UI test jobs
Publish the mac_ui_tests_controls test results - build error Needs human investigation no indeterminate; leg absent on base; ##[error]There are one or more test failures detected in result files; macOS UI test suite
maui-pr-uitests (macOS UITests Controls CollectionView) Needs human investigation no aborted check (CANCELLED); aborted legs carry no extractable failure; result is not a trustworthy pass; manual log review required
Build Analysis Needs human investigation no unmapped — no inspectable AzDO build evidence behind this check; read the details URL before trusting any verdict

Recommended action

Investigate the 5 deterministic regressions vs base — particularly Bugzilla43941Test and Issue26498TestNullException, which are actual test failures on a leg that was clean on the base build — and wait for the pending macOS UITests job to complete before merging. The 3 iOS simulator-run infra failures (Install Simulator Runtimes, PublishTestResults, Publish Logs) appear to be a cascade from a single failed simulator install and may warrant a rerun of the iOS UI tests.

Evidence details

PR scope: 3 files changed; platform labels: platform/ios, platform/macos; area: area-controls-button; inferred platforms: iOS, macOS.

Builds inspected:

  • maui-pr: PR build 1494515 (failed); base build 1491319 (succeeded on main, 2026-07-02)
  • maui-pr-devicetests: PR build 1494517 (failed); base build 1491321 (failed on main — 1 baseline failure)
  • maui-pr-uitests: PR build 1494516 (failed); base build 1491320 (failed on main — 14 baseline failures; only 8 of 12 failed logs inspected; baseline list may be incomplete)

Regressed-vs-base detail: Bugzilla43941Test and Issue26498TestNullException passed on the most recent maui-pr base build (1491319) and are now failing on this PR run. No ci-scan history confirmed them as recurring on main, so they cannot be demoted. They run in the same failing UI test jobs as the cascading iOS infra failures — a rerun of those jobs could clarify whether these test failures are also environment-induced or truly PR-related.

CI-scan demotions: Run Helix Tests - build error, Issue1939Test, and MemoryLeakB42329 were computed as regressed-vs-base by leg diff, but ci-scan base-branch history (family: main, 36 matchers loaded) documented them as recurring on main via #36141 and #35957, demoting their attribution to indeterminate (Needs human investigation rather than Not ready).

Device tests — Windows: Helix job ca4653e1 reported 2 failed work items (Controls.DeviceTests-packaged and Controls.DeviceTests-unpackaged); both timed out after 480 s waiting for HybridWebView results with crash dumps present. Other device-test Helix jobs (Android CoreCLR, Android Mono x2, iOS Mono x2, MacCatalyst Mono x2) all reported confirmed-clean work items (0 failed), but their parent GitHub check conclusions carry the XHarness exit-0 caveat and could not be positively confirmed from the unauthenticated runner.

21 unexplained build legs (log produced no extractable failure name): Controls Editor/Effects/Essentials/FlyoutPage/Focus/Fonts/Frame/Gestures/GraphicsView; Controls ViewBaseTests/VisualStateManager/Window; Controls (vlatest) RadioButton/RefreshView; Controls Shell; Controls (vlatest); Controls Page/Performance/Picker/ProgressBar; Controls SearchBar/Shape/Slider; Controls Image/ImageButton/IndicatorView/InputTransparent/IsEnabled/IsVisible; Controls CollectionView; Controls CarouselView; plus iOS/macOS publish-test-results steps.

AzDO access: Unauthenticated (no AzDO bearer token); authenticated test-API queries were not available.

@kubaflo kubaflo 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.

Could you check the test failures?

@github-actions github-actions Bot added the s/agent-ready-for-rerun AI review has a new PR-author comment or commit and is ready for rerun label Jul 8, 2026
@github-actions github-actions Bot added s/agent-review-in-progress AI review is currently running for this PR and removed s/agent-ready-for-rerun AI review has a new PR-author comment or commit and is ready for rerun s/agent-review-in-progress AI review is currently running for this PR labels Jul 8, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@jfversluis — new AI review results are available based on this last commit: c143fe6. To request a fresh review after new comments or commits, comment /review rerun.

Gate Passed Confidence Medium Platform iOS


🔍 Custom Prompt Analysis — maintainer-requested

● AI-generated — supplementary analysis from a maintainer-supplied custom prompt (GitHub Copilot CLI).

Requested: Also consider UI tests: is the CharacterSpacing + text-update interaction on Button covered, and are there iOS-specific edge cases worth testing? Be concise.

UI-test coverage

  • Regular Button UI test exists but is disabled for iOS/Catalyst: Button_SetCharacterSpacingAndText_VerifyVisualState is wrapped in #if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST, so it does not provide active iOS UI coverage for this fix.
  • Material3 Button UI test is active: VerifyMaterial3Button_SetCharacterSpacingAndText enters CharacterSpacing and Text and verifies a screenshot, but it is broader visual coverage and does not directly assert the native attributed title after a Text update.
  • PR coverage is primarily device-level: the added iOS device test directly covers the regression by changing button.Text after CharacterSpacing is applied and asserting both updated text and preserved character spacing in CurrentAttributedTitle.

iOS edge cases worth testing

  • The new device test already covers the most important iOS-specific variants: with/without ContentLayout, plus TextTransform.Uppercase.
  • A useful additional edge case would be updating text to empty/null while character spacing is applied, since the PR changed TitleLabel.Text from only clearing empty text to always assigning the transformed text.
  • If UI coverage is desired, prefer re-enabling or adding an iOS-capable Button UI/screenshot test for the regular Button path; otherwise the targeted iOS device test is the stronger coverage for this native attributed-title behavior.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ✅ PASSED

Platform: IOS · Base: main · Merge base: 9a71eb6e

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 ButtonTests (TextUpdatesAttributedTitleWhenCharacterSpacingApplied) Category=Button ✅ FAIL — 416s ✅ PASS — 259s
🔴 Without fix — 📱 ButtonTests (TextUpdatesAttributedTitleWhenCharacterSpacingApplied): FAIL ✅ · 416s

(truncated to last 15,000 chars)

ion ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085460] 2026-07-08 07:36:15.707462-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085560] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085600] 2026-07-08 07:36:15.707614-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass17_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085650] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085730] 2026-07-08 07:36:15.707746-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085770] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085900] 2026-07-08 07:36:15.707891-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085930] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085950] 2026-07-08 07:36:15.707991-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ButtonTests.TextUpdatesAttributedTitleWhenCharacterSpacingApplied(Boolean useContentLayout, TextTransform textTransform, String initialText, String updatedText)
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7085980] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7523820] 2026-07-08 07:36:15.751917-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] [FAIL] TextUpdatesAttributedTitleWhenCharacterSpacingApplied(useContentLayout: False, textTransform: Uppercase, initialText: "INITIAL", updatedText: "UPDATED")
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7524400] Assert.Equal() Failure: Strings differ
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7524810] Expected: "INITIAL"
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7524870] Actual:   null
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7525050] 2026-07-08 07:36:15.752102-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ButtonTests.<>c__DisplayClass12_0.<<TextUpdatesAttributedTitleWhenCharacterSpacingApplied>b__1>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7525100] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7525200] 2026-07-08 07:36:15.752238-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass17_1`1.<<CreateHandlerAndAddToWindow>b__1>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7525260] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7525380] 2026-07-08 07:36:15.752395-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass31_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7525440] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7526830] 2026-07-08 07:36:15.752490-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass31_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7527570] 2026-07-08 07:36:15.752569-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7527650]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7527710] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7529670] 2026-07-08 07:36:15.752703-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7530130] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7530300] 2026-07-08 07:36:15.752853-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass17_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7530350] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7531690] 2026-07-08 07:36:15.752966-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7531920] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7532830] 2026-07-08 07:36:15.753065-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7532930] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7533060] 2026-07-08 07:36:15.753168-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ButtonTests.TextUpdatesAttributedTitleWhenCharacterSpacingApplied(Boolean useContentLayout, TextTransform textTransform, String initialText, String updatedText)
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.7533120] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8010380] 2026-07-08 07:36:15.800764-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] [FAIL] TextUpdatesAttributedTitleWhenCharacterSpacingApplied(useContentLayout: False, textTransform: Default, initialText: "Initial", updatedText: "Updated")
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8010970] Assert.Equal() Failure: Strings differ
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8011040] Expected: "Initial"
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8011090] Actual:   null
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8011230] 2026-07-08 07:36:15.800891-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ButtonTests.<>c__DisplayClass12_0.<<TextUpdatesAttributedTitleWhenCharacterSpacingApplied>b__1>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8011280] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8025660] 2026-07-08 07:36:15.801004-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass17_1`1.<<CreateHandlerAndAddToWindow>b__1>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8025950] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8026000] 2026-07-08 07:36:15.801160-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass31_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8026040] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8036130] 2026-07-08 07:36:15.801601-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass31_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8041690] 2026-07-08 07:36:15.802790-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8041880]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8041940] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8042090] 2026-07-08 07:36:15.803587-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8042130] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8043230] 2026-07-08 07:36:15.804167-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass17_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8043570] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8045030] 2026-07-08 07:36:15.804251-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8045240] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8045970] 2026-07-08 07:36:15.804424-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8046120] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8046950] 2026-07-08 07:36:15.804524-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ButtonTests.TextUpdatesAttributedTitleWhenCharacterSpacingApplied(Boolean useContentLayout, TextTransform textTransform, String initialText, String updatedText)
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8047130] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8177180] 2026-07-08 07:36:15.817502-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] Finished:    /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Bundle/Application/93CB59B9-7240-463B-AE18-F0BD82A3FF7C/Microsoft.Maui.Controls.DeviceTests.app/Microsoft.Maui.Controls.DeviceTests.dll
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8188020] 2026-07-08 07:36:15.818565-0700 Microsoft.Maui.Controls.DeviceTests[6617:44399] Tests run: 21 Passed: 18 Inconclusive: 0 Failed: 3 Ignored: 0
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8229730] 2026-07-08 07:36:15.822764-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] Xml file was written to the provided writer.
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8230360] 2026-07-08 07:36:15.822897-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8230530] === TEST EXECUTION SUMMARY ===
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8230580] Tests run: 21 Passed: 18 Inconclusive: 0 Failed: 3 Ignored: 0 Skipped: 0
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8233710] 2026-07-08 07:36:15.823222-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] Test results saved to: /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Data/Application/78DC99A2-20E8-4D77-94B0-B6CED44A5D2B/Documents/test-results.xml
�[40m�[37mdbug�[39m�[22m�[49m: ==================== End of ApplicationLog ====================
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling the application 'com.microsoft.maui.controls.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.0.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.controls.devicetests' was uninstalled successfully
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "P62KC4CQGN-1",
        "exitCode": 1,
        "exitCodeName": "TESTS_FAILED",
        "platform": "apple",
        "device": "iPhone 11 Pro",
        "deviceOsVersion": "26.0",
        "files": [
          {
            "name": "test-ios-simulator-64_26.0-E81BA88B-0368-4589-8B10-EA33EA337C75.log",
            "type": "executionlog"
          },
          {
            "name": "list-ios-simulator-64_26.0-20260708_073502.log",
            "type": "devicelist"
          },
          {
            "name": "test-ios-simulator-64_26.0-20260708_073509.log",
            "type": "testlog"
          },
          {
            "name": "iPhone 11 Pro.log",
            "type": "systemlog"
          },
          {
            "name": "Microsoft.Maui.Controls.DeviceTests.log",
            "type": "systemlog"
          },
          {
            "name": "com.microsoft.maui.controls.devicetests.log",
            "type": "applicationlog"
          },
          {
            "name": "xunit-test-ios-simulator-64_26.0-20260708_073509.xml",
            "type": "xmllog"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
XHarness exit code: 1 (TESTS_FAILED)
  Passed: 0
  Failed: 0
  Tests completed with exit code: 1

🟢 With fix — 📱 ButtonTests (TextUpdatesAttributedTitleWhenCharacterSpacingApplied): PASS ✅ · 259s

(truncated to last 15,000 chars)

trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8036130] 2026-07-08 07:36:15.801601-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass31_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8041690] 2026-07-08 07:36:15.802790-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8041880]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8041940] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8042090] 2026-07-08 07:36:15.803587-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8042130] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8043230] 2026-07-08 07:36:15.804167-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass17_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8043570] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8045030] 2026-07-08 07:36:15.804251-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8045240] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8045970] 2026-07-08 07:36:15.804424-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8046120] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8046950] 2026-07-08 07:36:15.804524-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]    at Microsoft.Maui.DeviceTests.ButtonTests.TextUpdatesAttributedTitleWhenCharacterSpacingApplied(Boolean useContentLayout, TextTransform textTransform, String initialText, String updatedText)
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8047130] --- End of stack trace from previous location ---
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8177180] 2026-07-08 07:36:15.817502-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] Finished:    /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Bundle/Application/93CB59B9-7240-463B-AE18-F0BD82A3FF7C/Microsoft.Maui.Controls.DeviceTests.app/Microsoft.Maui.Controls.DeviceTests.dll
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8188020] 2026-07-08 07:36:15.818565-0700 Microsoft.Maui.Controls.DeviceTests[6617:44399] Tests run: 21 Passed: 18 Inconclusive: 0 Failed: 3 Ignored: 0
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8229730] 2026-07-08 07:36:15.822764-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] Xml file was written to the provided writer.
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8230360] 2026-07-08 07:36:15.822897-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857]
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8230530] === TEST EXECUTION SUMMARY ===
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8230580] Tests run: 21 Passed: 18 Inconclusive: 0 Failed: 3 Ignored: 0 Skipped: 0
�[40m�[37mdbug�[39m�[22m�[49m: [07:36:15.8233710] 2026-07-08 07:36:15.823222-0700 Microsoft.Maui.Controls.DeviceTests[6617:43857] Test results saved to: /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Data/Application/78DC99A2-20E8-4D77-94B0-B6CED44A5D2B/Documents/test-results.xml
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:57.9409250] xcrun simctl launch --console --terminate-running-process E81BA88B-0368-4589-8B10-EA33EA337C75 com.microsoft.maui.controls.devicetests
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:58.6415180] com.microsoft.maui.controls.devicetests: 7381
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.7645150] 2026-07-08 07:39:59.763811-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [UIKit App Config] `UIScene` lifecycle will soon be required. Failure to adopt will result in an assert in the future.
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8248630] 2026-07-08 07:39:59.824463-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] TestFilter: Category=Button
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8353000] 2026-07-08 07:39:59.834955-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_AUTOSTART = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8355150] 2026-07-08 07:39:59.835171-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_AUTOEXIT = 'true'
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8355580] 2026-07-08 07:39:59.835311-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_ENABLE_NETWORK = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8355660] 2026-07-08 07:39:59.835413-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   DISABLE_SYSTEM_PERMISSION_TESTS = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8357480] 2026-07-08 07:39:59.835508-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_HOSTNAME = '127.0.0.1'
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8359030] 2026-07-08 07:39:59.835649-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_TRANSPORT = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8360910] 2026-07-08 07:39:59.835853-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_LOG_FILE = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8363360] 2026-07-08 07:39:59.836023-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_HOSTPORT = '50940'
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8364320] 2026-07-08 07:39:59.836225-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   USE_TCP_TUNNEL = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8367380] 2026-07-08 07:39:59.836364-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   RUN_END_TAG = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8367440] 2026-07-08 07:39:59.836475-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_ENABLE_XML_OUTPUT = 'true'
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8367530] 2026-07-08 07:39:59.836581-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_ENABLE_XML_MODE = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8368470] 2026-07-08 07:39:59.836678-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_XML_VERSION = 'xUnit'
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8369700] 2026-07-08 07:39:59.836827-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_SORTNAMES = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8370700] 2026-07-08 07:39:59.836935-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_RUN_ALL = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8371390] 2026-07-08 07:39:59.837005-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_SKIPPED_METHODS = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8372400] 2026-07-08 07:39:59.837086-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   NUNIT_SKIPPED_CLASSES = ''
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8373150] 2026-07-08 07:39:59.837184-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]   headlessrunner = 'true'
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8699300] 2026-07-08 07:39:59.869477-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [Runner executing:	Run everything]
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8703780] 2026-07-08 07:39:59.870158-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [arm64:	iOS v26.0]
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8707600] 2026-07-08 07:39:59.870364-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [Device Name:	iPhone 11 Pro]
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8709150] 2026-07-08 07:39:59.870718-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [Device UDID:	6076d13c716a4f3ba15a6055bfb83fc1]
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8711170] 2026-07-08 07:39:59.870917-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [Device Locale:	en-US]
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8753690] 2026-07-08 07:39:59.875035-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [Device Date/Time:	7/8/2026 7:39:59 AM]
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8755470] 2026-07-08 07:39:59.875330-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] [Bundle:	com.microsoft.maui.controls.devicetests]
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8762010] 2026-07-08 07:39:59.876002-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Skipping categories: Category=Accessibility, Category=Application, Category=Behavior, Category=Border, Category=BoxView, Category=CarouselView, Category=CheckBox, Category=CollectionView, Category=Compatibility, Category=ContentView, Category=DatePicker, Category=Dispatcher, Category=Editor, Category=Element, Category=Entry, Category=FlexLayout, Category=FlyoutPage, Category=Frame, Category=Gesture, Category=HybridWebView, Category=Image, Category=Label, Category=Layout, Category=Lifecycle, Category=ListView, Category=Map, Category=MenuFlyout, Category=Mapper, Category=Memory, Category=Modal, Category=NavigationPage, Category=Page, Category=Path, Category=Picker, Category=RadioButton, Category=RefreshView, Category=ScrollView, Category=SearchBar, Category=Shape, Category=Shell, Category=Slider, Category=SwipeView, Category=TabbedPage, Category=TextInput, Category=Toolbar, Category=TemplatedView, Category=View, Category=VisualElement, Category=VisualElementTree, Category=WebView, Category=Window, Category=WindowOverlay, Category=Xaml
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8788770] 2026-07-08 07:39:59.878718-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Using reflection-based Xunit runner (threaded execution)
�[40m�[37mdbug�[39m�[22m�[49m: [07:39:59.8904810] 2026-07-08 07:39:59.890234-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Discovering: /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Bundle/Application/920E4DE2-5237-4A77-95E2-ACEBA5B41470/Microsoft.Maui.Controls.DeviceTests.app/Microsoft.Maui.Controls.DeviceTests.dll (method display = ClassAndMethod, method display options = None)
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:00.1134090] 2026-07-08 07:40:00.113075-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Discovered:  /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Bundle/Application/920E4DE2-5237-4A77-95E2-ACEBA5B41470/Microsoft.Maui.Controls.DeviceTests.app/Microsoft.Maui.Controls.DeviceTests.dll (found 9 of 454 test cases)
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:00.1170740] 2026-07-08 07:40:00.116767-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Starting:    /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Bundle/Application/920E4DE2-5237-4A77-95E2-ACEBA5B41470/Microsoft.Maui.Controls.DeviceTests.app/Microsoft.Maui.Controls.DeviceTests.dll
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:39.7984480] 2026-07-08 07:40:39.798086-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Finished:    /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Bundle/Application/920E4DE2-5237-4A77-95E2-ACEBA5B41470/Microsoft.Maui.Controls.DeviceTests.app/Microsoft.Maui.Controls.DeviceTests.dll
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:39.7993200] 2026-07-08 07:40:39.799122-0700 Microsoft.Maui.Controls.DeviceTests[7381:51150] Tests run: 21 Passed: 21 Inconclusive: 0 Failed: 0 Ignored: 0
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:39.8030940] 2026-07-08 07:40:39.802678-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Xml file was written to the provided writer.
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:39.8031180] 2026-07-08 07:40:39.802811-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091]
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:39.8031370] === TEST EXECUTION SUMMARY ===
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:39.8031460] Tests run: 21 Passed: 21 Inconclusive: 0 Failed: 0 Ignored: 0 Skipped: 0
�[40m�[37mdbug�[39m�[22m�[49m: [07:40:39.8034590] 2026-07-08 07:40:39.803286-0700 Microsoft.Maui.Controls.DeviceTests[7381:51091] Test results saved to: /Users/cloudtest/Library/Developer/CoreSimulator/Devices/E81BA88B-0368-4589-8B10-EA33EA337C75/data/Containers/Data/Application/E2830E32-75C0-4B6C-ACDD-C817FD885BBD/Documents/test-results.xml
�[40m�[37mdbug�[39m�[22m�[49m: ==================== End of ApplicationLog ====================
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling the application 'com.microsoft.maui.controls.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.0.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.controls.devicetests' was uninstalled successfully
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "P62KC4CQGN-1",
        "exitCode": 0,
        "exitCodeName": "SUCCESS",
        "platform": "apple",
        "device": "iPhone 11 Pro",
        "deviceOsVersion": "26.0",
        "files": [
          {
            "name": "test-ios-simulator-64_26.0-E81BA88B-0368-4589-8B10-EA33EA337C75.log",
            "type": "executionlog"
          },
          {
            "name": "list-ios-simulator-64_26.0-20260708_073951.log",
            "type": "devicelist"
          },
          {
            "name": "test-ios-simulator-64_26.0-20260708_073956.log",
            "type": "testlog"
          },
          {
            "name": "iPhone 11 Pro.log",
            "type": "systemlog"
          },
          {
            "name": "Microsoft.Maui.Controls.DeviceTests.log",
            "type": "systemlog"
          },
          {
            "name": "com.microsoft.maui.controls.devicetests.log",
            "type": "applicationlog"
          },
          {
            "name": "xunit-test-ios-simulator-64_26.0-20260708_073956.xml",
            "type": "xmllog"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
XHarness exit code: 0
  Passed: 0
  Failed: 0
  Tests completed successfully

📁 Fix files reverted (2 files)
  • src/Controls/src/Core/Button/Button.iOS.cs
  • src/Controls/src/Core/Platform/iOS/Extensions/ButtonExtensions.cs

📱 UI Tests — Button

Detected UI test categories: Button

❌ Deep UI tests — 23 passed, 48 failed across 1 category on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Button 23/72 (48 ❌) 100 diff PNGs
❌ Button — 48 failed tests
ButtonLayoutResizesWithImagePosition
System.InvalidOperationException : 
Snapshot different than baseline: ButtonLayoutResizesWithImagePositionTop.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ButtonLayoutResizesWithImagePositionTop.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline ima
...
TextViewBasedControlsRestoreDefaultAfterResetToNull
System.InvalidOperationException : 
Snapshot different than baseline: AfterResetTextColorToNullOnTextViewBasedControls.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: AfterResetTextColorToNullOnTextViewBasedControls.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then updat
...
Button_setPaddingAndText_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setPaddingAndText_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 410
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at Sy
...
Button_setFontSizeAndLineBreakMode_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setFontSizeAndLineBreakMode_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 236
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Button_SetBorderColorAndTextColor_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_SetBorderColorAndTextColor_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 37
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
ButtonLayoutAndSpacingTests
System.InvalidOperationException : 
Snapshot different than baseline: Issue22433_Default.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: Issue22433_Default.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the bu
...
Button_setFontAttributesAndFontFamily_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setFontAttributesAndFontFamily_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 148
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
ImageSourceInitializesCorrectly
System.InvalidOperationException : 
Snapshot different than baseline: ImageSourceInitializesCorrectly.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ImageSourceInitializesCorrectly.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test att
...
VerifyButtonPage6
System.InvalidOperationException : 
Snapshot different than baseline: VerifyButtonPage6.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyButtonPage6.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the buil
...
Issue21513Test
System.InvalidOperationException : 
Snapshot different than baseline: Issue21513Test.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: Issue21513Test.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build arti
...
Button_SetCornerRadiusAndBorderWidth_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_SetCornerRadiusAndBorderWidth_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 119
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
VerifyButtonPage8
System.InvalidOperationException : 
Snapshot different than baseline: VerifyButtonPage8_Start.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyButtonPage8_Start.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or downl
...
BorderWidthAffectsTheImageSizing
System.InvalidOperationException : 
Snapshot different than baseline: BorderWidthAffectsTheImageSizingOriginal.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: BorderWidthAffectsTheImageSizingOriginal.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline i
...
ButtonResizesWhenTitleOrImageChanges
System.InvalidOperationException : 
Snapshot different than baseline: ButtonResizesWhenTitleOrImageChangesOriginal.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ButtonResizesWhenTitleOrImageChangesOriginal.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the ba
...
Button_setShadowAndText_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setShadowAndText_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 426
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at Sys
...
VerifyButtonPage5
System.InvalidOperationException : 
Snapshot different than baseline: VerifyButtonPage5.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyButtonPage5.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the buil
...
VerifyButtonPage3
System.InvalidOperationException : 
Snapshot different than baseline: VerifyButtonPage3.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyButtonPage3.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the buil
...
Issue18242Test
System.InvalidOperationException : 
Snapshot different than baseline: Issue18242Test.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: Issue18242Test.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build arti
...
Button_SetLineBreakModeWordWrap_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_SetLineBreakModeWordWrap_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 388
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
 
...
VerifyButtonPage4
System.InvalidOperationException : 
Snapshot different than baseline: VerifyButtonPage4.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyButtonPage4.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the buil
...
ButtonTitleFillsSpaceWhenImageChanges
System.InvalidOperationException : 
Snapshot different than baseline: ButtonTitleFillsSpaceWhenImageChangesOriginal.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ButtonTitleFillsSpaceWhenImageChangesOriginal.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the 
...
Button_setTextAndTextColor_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setTextAndTextColor_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 442
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at 
...
VerifyButtonPage1
System.InvalidOperationException : 
Snapshot different than baseline: VerifyButtonPage1_NoBorder.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyButtonPage1_NoBorder.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or
...
Button_setFontSizeAndTextTransform_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setFontSizeAndTextTransform_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 274
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
ButtonPaddingIsAddedWhenNeeded
System.InvalidOperationException : 
Snapshot different than baseline: ButtonPaddingIsAddedWhenNeeded.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ButtonPaddingIsAddedWhenNeeded.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attac
...
Button_SetLineBreakModeHeadTruncation_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_SetLineBreakModeHeadTruncation_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 337
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* a
...
Button_setFontAttributesAndTextTransform_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setFontAttributesAndTextTransform_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 182
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Button_setFontFamilyAndTextTransform_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setFontFamilyAndTextTransform_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 216
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
ShouldUpdateButtonShadowWithTransparentColor
System.InvalidOperationException : 
Snapshot different than baseline: ShouldUpdateButtonShadowWithTransparentColor.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow


iOS 26 visual tests require an iPhone 11 Pro simulator for correct screen resolution.
To create the simulator, run:
  xcrun simctl create "iPhone 11 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-0

Then run the tests targeting the new simulator.
  ----> VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ShouldUpdateButtonShadowWithTransparentColor.png (size differs - baseline is 1124x2286 pixels, actual is 1206x2472 pixels)
If the correct baseline has changed (this isn't a a bug), then update the ba
...
Button_setFontAttributesAndText_VerifyVisualState
System.InvalidOperationException : Unable to extract difference percentage from exception message.
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ButtonFeatureTests.Button_setFontAttributesAndText_VerifyVisualState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ButtonFeatureTests.cs:line 164
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

(+18 more — see TRX in artifact)

📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)


📋 Pre-Flight — Context & Validation

Issue: unavailable - GitHub authentication unavailable; inferred from gate as iOS Button attributed-title stale after Text changes with CharacterSpacing
PR: #36326 - iOS Button CharacterSpacing text update regression
Platforms Affected: iOS
Files Changed: 2 implementation, 1 test

Key Findings

  • The PR changes src/Controls/src/Core/Button/Button.iOS.cs and src/Controls/src/Core/Platform/iOS/Extensions/ButtonExtensions.cs, plus an iOS Controls device test.
  • Gate already passed: without fix, ButtonTests.TextUpdatesAttributedTitleWhenCharacterSpacingApplied fails; with fix, Category=Button passes.
  • The root behavior is UIKit attributed-title staleness: SetTitle updates the plain title, while CurrentAttributedTitle can remain null or retain the previous value when character spacing is applied.
  • gh is unauthenticated, so PR body, linked issue, comments, prior reviews, and required checks could not be queried.

Code Review Summary

Verdict: NEEDS_DISCUSSION
Confidence: medium
Errors: 0 | Warnings: 1 | Suggestions: 1

Key code review findings:

  • Warning: CI/prior-review surfaces unavailable because gh is unauthenticated; local gate and local device-test evidence were used instead.
  • Suggestion: Add a future edge-case test for updating text to empty/null while character spacing is applied.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #36326 Controls MapText re-runs CharacterSpacing mapper and Controls UpdateText synchronizes TitleLabel.Text to transformed text PASSED (Gate) Button.iOS.cs, ButtonExtensions.cs, ButtonTests.iOS.cs Original PR

🔬 Code Review — Deep Analysis

Code Review - PR #36326

Independent Assessment

What this changes: Updates the iOS Controls Button text mapping so a text change also refreshes attributed-title state when CharacterSpacing is applied, and adds an iOS Controls device regression test.
Inferred motivation: UIButton.SetTitle updates the plain title but does not reliably rebuild CurrentAttributedTitle; UpdateCharacterSpacing reads from TitleLabel.AttributedText, so stale or null label text leaves the attributed title stale after Button.Text changes.

Reconciliation with PR Narrative

Author claims: GitHub PR metadata was unavailable because gh is unauthenticated in this environment. Local gate artifacts identify the scenario as ButtonTests.TextUpdatesAttributedTitleWhenCharacterSpacingApplied on iOS.
Agreement/disagreement: Local diff and gate output agree that the fix targets iOS Button text updates with CharacterSpacing and that the regression test fails without the fix and passes with the PR fix.

Prior Review Reconciliation

No prior error findings could be queried because GitHub API access is unavailable.

Blast Radius Assessment

  • Runs for all instances: Yes, for iOS Controls Button text updates.
  • Startup impact: No.
  • Static/shared state: No.

CI Status

  • Required-check result: unavailable; gh is unauthenticated.
  • Classification: undetermined.
  • Action taken: used local gate output and local iOS device-test runs only.

Findings

No code-review error findings were identified from the local diff. The main tradeoff is fix placement: the PR is localized to Controls Button text mapping, while broader alternatives in Core UIButton.UpdateCharacterSpacing may help more callers but increase blast radius.

Failure-Mode Probing

  • Text changes after initial CharacterSpacing: PR gate shows the new test fails without fix and passes with fix.
  • TextTransform.Uppercase: PR gate and candidate tests include the uppercase row.
  • ContentLayout present: PR gate and candidate tests include useContentLayout: true.
  • Null/empty text: not covered by the new test; custom prompt artifact identified this as a useful follow-up edge case.

Verdict: NEEDS_DISCUSSION

Confidence: medium. The local gate evidence is strong for the targeted iOS Button scenario, but GitHub PR metadata, prior review comments, and required CI status were unavailable.
Summary: The PR fix is valid for the targeted regression. Alternative candidates show there are broader or more direct ways to fix the same native attributed-title stale-state issue, but they each carry tradeoffs.


🛠️ Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix Reuse Core ButtonHandler.MapFormatting from Controls MapText and drop the PR's always-sync TitleLabel.Text change Blocked 2 files Clean rerun hit missing xUnit results/AOT stale-artifact crash; approach also bypasses mapper extensibility
2 try-fix Build attributed title directly in Controls iOS UpdateText from transformed text when CharacterSpacing != 0 PASS 1 file Passes targeted Button device tests, but duplicates Core formatting logic in Controls
3 try-fix Make Core iOS UpdateCharacterSpacing rebuild from CurrentTitle when TitleLabel.AttributedText is null or stale, while keeping mapper re-entry PASS 3 files Passes targeted Button device tests after learning that stale attributed text must be detected by value
PR PR #36326 Re-run CharacterSpacing mapper on text changes and keep TitleLabel.Text synchronized to transformed text PASSED (Gate) 3 files Original PR; gate already proved fail-without/pass-with fix

Cross-Pollination

Model/Reviewer Round New Ideas? Details
maui-expert-reviewer 1 Yes Suggested mapper-formatting reuse, direct Controls attributed-title rebuild, and Core UpdateCharacterSpacing source-of-truth fallback
local expert/test loop 2 Yes Candidate 3 learned null fallback was insufficient; stale attributed values must be compared against CurrentTitle
local expert/test loop 3 No Remaining meaningful alternatives are variations of the same three strategies: mapper re-entry, direct rebuild, or Core source-of-truth change

Exhausted: Yes
Selected Fix: PR #36326 - The PR fix is the best balance: it passes the gate, stays localized to Controls iOS Button behavior, uses the mapper system for CharacterSpacing, and avoids duplicating attributed-string construction. Candidate 3 is the strongest alternative if maintainers prefer fixing the Core iOS formatter source-of-truth, but it has broader blast radius. Candidate 2 passes but is less maintainable because it duplicates Core formatting logic.


🏁 Report — Final Recommendation

Comparative Fix Report — PR #36326

Candidate Ranking

Rank Candidate Regression Result Assessment
1 pr PASS Best balance of correctness, maintainability, and blast radius. Uses existing mapper infrastructure to rebuild attributed titles after Controls text updates and keeps UIKit TitleLabel.Text synchronized with transformed text.
1 pr-plus-reviewer PASS Equivalent to pr; the expert reviewer produced no actionable findings, so no sandbox changes were applied.
3 try-fix-3 PASS Strong alternative that fixes stale attributed-title source selection in Core iOS UpdateCharacterSpacing, but it has broader blast radius across all core iOS UIButton character-spacing consumers.
4 try-fix-2 PASS Functionally passes targeted tests, but duplicates Core attributed-string construction inside Controls and handles only the explicit character-spacing formatting path.
5 try-fix-1 BLOCKED Must rank below passing candidates. It also bypasses mapper extensibility by calling ButtonHandler.MapFormatting directly and reverted the broader TitleLabel.Text synchronization.

Candidate Details

pr

The PR fix changes Controls iOS Button.MapText to call handler.UpdateValue(nameof(CharacterSpacing)) after the Controls-specific UpdateText(button) call. It also changes ButtonExtensions.UpdateText to assign platformButton.TitleLabel.Text = text for every text update, where text is the transformed display text. The regression test verifies that CurrentAttributedTitle updates from Initial to Updated while preserving kerning, including ContentLayout and uppercase TextTransform cases.

This approach is localized to Controls iOS Button behavior, preserves mapper extensibility, and avoids duplicating attributed-string formatting logic.

pr-plus-reviewer

The expert reviewer wrote [] to inline-findings.json, so there were no actionable changes to apply. This candidate is therefore identical to pr and shares the same ranking and rationale.

try-fix-1

This candidate replaced handler.UpdateValue(nameof(CharacterSpacing)) with direct ButtonHandler.MapFormatting(handler, button) and restored the older empty-text-only TitleLabel.Text workaround. Its regression run was blocked by an untrustworthy stale-artifact/AOT failure and no reliable xUnit result file, so it must rank below all passing candidates. Independently, it is weaker than the PR because direct mapper invocation bypasses mapper extensibility.

try-fix-2

This candidate directly rebuilt an attributed title inside Controls UpdateText when CharacterSpacing != 0. It passed the targeted Button device tests, including all three new regression data rows. However, it duplicates Core iOS formatting behavior in the Controls layer and risks diverging from future Core formatting changes such as text color or font handling.

try-fix-3

This candidate kept mapper re-entry but moved the source-of-truth fix into Core iOS UpdateCharacterSpacing, rebuilding from CurrentTitle when TitleLabel.AttributedText was null or stale. It passed targeted Button device tests after correcting the stale-value case. It is the best non-PR alternative, but it touches the shared Core iOS formatter and therefore has broader blast radius than the PR's localized Controls fix.

Winning Candidate

Winner: pr

pr and pr-plus-reviewer are equivalent because the expert reviewer found no actionable issues. The raw PR fix wins because it passes the supplied fail-without/pass-with regression gate, preserves the mapper pipeline, avoids duplicated attributed-title construction, and keeps the change scoped to the Controls iOS Button path that introduced the stale attributed-title behavior.


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@jfversluis

Copy link
Copy Markdown
Member Author

Checked the current failures from the latest /azp run.

The red checks don't appear to be caused by this PR's Button/CharacterSpacing change:

  • The same merge commit (82173c5c...) had maui-pr pass in build 1494193, then failed in the later rerun build 1494515.
  • The maui-pr failure is an iOS simulator provisioning timeout: Unable to connect to simulator, followed by the simulator-runtime cleanup hanging until the task timed out. The PublishTestResults/Publish Logs failures are downstream of that.
  • The named UI test failures are Android ListView tests (Bugzilla43941Test, Issue26498TestNullException) failing with Appium wait/app-running timeouts. This PR only changes iOS/MacCatalyst Button attributed-title mapping and an iOS/MacCatalyst Button device test.
  • The Windows device-test failure is a HybridWebView timeout/crash in Helix, unrelated to Button/CharacterSpacing.
  • The older MauiBot mapper-chain feedback was already addressed in the latest commit by switching to handler.UpdateValue(nameof(CharacterSpacing)).

No additional code change looks warranted from these failures; requesting a fresh CI run to clear the infra/flaky failures.

@jfversluis

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@kubaflo
kubaflo changed the base branch from main to inflight/current July 9, 2026 10:53
@kubaflo
kubaflo merged commit 51a6011 into inflight/current Jul 9, 2026
140 of 162 checks passed
@kubaflo
kubaflo deleted the jfversluis-fix-ios-button-character-spacing-text branch July 9, 2026 11:00
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jul 9, 2026
kubaflo pushed a commit that referenced this pull request Jul 10, 2026
<!-- 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

Controls replaces the core `Button.Text` mapper on iOS/MacCatalyst so it
can handle Controls-specific behavior such as `TextTransform` and
`ContentLayout`. That Controls mapper updated the native `UIButton`
title but did not rebuild the attributed title used when
`CharacterSpacing` is applied, so UIKit could continue displaying the
previous `CurrentAttributedTitle` after `Button.Text` changed.

### Description of Change

After Controls updates the native button text on iOS/MacCatalyst, it now
reapplies the core button formatting mapper so the attributed title is
rebuilt from the latest text.

The iOS Controls `UIButton.UpdateText` helper also keeps
`TitleLabel.Text` synchronized with the transformed text for every text
update. This gives `UpdateCharacterSpacing` the current text when it
rebuilds the attributed title.

### Key Technical Details

- `Button.iOS.cs` now calls `ButtonHandler.MapFormatting(handler,
button)` after `UpdateText(button)`.
- `ButtonExtensions.UpdateText` now assigns
`platformButton.TitleLabel.Text = text` for all text updates, not only
when the logical `Button.Text` is empty.
- The regression test checks the native `CurrentAttributedTitle` text
and kerning after `Text` changes with `CharacterSpacing` applied.

### Edge Cases Covered

| Scenario | Coverage |
| --- | --- |
| `CharacterSpacing` + text update | Device test and external repro |
| `CharacterSpacing` + `ContentLayout` + text update | Device test and
external repro |
| `CharacterSpacing` + `TextTransform` + text update | Device test and
external repro |

@tdeborde2 @weases could you please try the PR artifacts when CI
publishes them and confirm whether this resolves the issue in your apps?

### Issues Fixed

Fixes #21488

### Validation

- Reproduced the issue with the external repro project from #21488 on
.NET 10 / MAUI 10.0.80.
- Verified the same repro passes when rebuilt against the fixed local
MAUI artifacts, including CharacterSpacing, CharacterSpacing +
ContentLayout, and CharacterSpacing + TextTransform cases.
- Ran Controls Button device tests on MacCatalyst: 21/21 passed.
- Built the iOS Controls device-test app successfully.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 15, 2026
<!-- 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

Controls replaces the core `Button.Text` mapper on iOS/MacCatalyst so it
can handle Controls-specific behavior such as `TextTransform` and
`ContentLayout`. That Controls mapper updated the native `UIButton`
title but did not rebuild the attributed title used when
`CharacterSpacing` is applied, so UIKit could continue displaying the
previous `CurrentAttributedTitle` after `Button.Text` changed.

### Description of Change

After Controls updates the native button text on iOS/MacCatalyst, it now
reapplies the core button formatting mapper so the attributed title is
rebuilt from the latest text.

The iOS Controls `UIButton.UpdateText` helper also keeps
`TitleLabel.Text` synchronized with the transformed text for every text
update. This gives `UpdateCharacterSpacing` the current text when it
rebuilds the attributed title.

### Key Technical Details

- `Button.iOS.cs` now calls `ButtonHandler.MapFormatting(handler,
button)` after `UpdateText(button)`.
- `ButtonExtensions.UpdateText` now assigns
`platformButton.TitleLabel.Text = text` for all text updates, not only
when the logical `Button.Text` is empty.
- The regression test checks the native `CurrentAttributedTitle` text
and kerning after `Text` changes with `CharacterSpacing` applied.

### Edge Cases Covered

| Scenario | Coverage |
| --- | --- |
| `CharacterSpacing` + text update | Device test and external repro |
| `CharacterSpacing` + `ContentLayout` + text update | Device test and
external repro |
| `CharacterSpacing` + `TextTransform` + text update | Device test and
external repro |

@tdeborde2 @weases could you please try the PR artifacts when CI
publishes them and confirm whether this resolves the issue in your apps?

### Issues Fixed

Fixes #21488

### Validation

- Reproduced the issue with the external repro project from #21488 on
.NET 10 / MAUI 10.0.80.
- Verified the same repro passes when rebuilt against the fixed local
MAUI artifacts, including CharacterSpacing, CharacterSpacing +
ContentLayout, and CharacterSpacing + TextTransform cases.
- Ran Controls Button device tests on MacCatalyst: 21/21 passed.
- Built the iOS Controls device-test app successfully.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 22, 2026
<!-- 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

Controls replaces the core `Button.Text` mapper on iOS/MacCatalyst so it
can handle Controls-specific behavior such as `TextTransform` and
`ContentLayout`. That Controls mapper updated the native `UIButton`
title but did not rebuild the attributed title used when
`CharacterSpacing` is applied, so UIKit could continue displaying the
previous `CurrentAttributedTitle` after `Button.Text` changed.

### Description of Change

After Controls updates the native button text on iOS/MacCatalyst, it now
reapplies the core button formatting mapper so the attributed title is
rebuilt from the latest text.

The iOS Controls `UIButton.UpdateText` helper also keeps
`TitleLabel.Text` synchronized with the transformed text for every text
update. This gives `UpdateCharacterSpacing` the current text when it
rebuilds the attributed title.

### Key Technical Details

- `Button.iOS.cs` now calls `ButtonHandler.MapFormatting(handler,
button)` after `UpdateText(button)`.
- `ButtonExtensions.UpdateText` now assigns
`platformButton.TitleLabel.Text = text` for all text updates, not only
when the logical `Button.Text` is empty.
- The regression test checks the native `CurrentAttributedTitle` text
and kerning after `Text` changes with `CharacterSpacing` applied.

### Edge Cases Covered

| Scenario | Coverage |
| --- | --- |
| `CharacterSpacing` + text update | Device test and external repro |
| `CharacterSpacing` + `ContentLayout` + text update | Device test and
external repro |
| `CharacterSpacing` + `TextTransform` + text update | Device test and
external repro |

@tdeborde2 @weases could you please try the PR artifacts when CI
publishes them and confirm whether this resolves the issue in your apps?

### Issues Fixed

Fixes #21488

### Validation

- Reproduced the issue with the external repro project from #21488 on
.NET 10 / MAUI 10.0.80.
- Verified the same repro passes when rebuilt against the fixed local
MAUI artifacts, including CharacterSpacing, CharacterSpacing +
ContentLayout, and CharacterSpacing + TextTransform cases.
- Ran Controls Button device tests on MacCatalyst: 21/21 passed.
- Built the iOS Controls device-test app successfully.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 28, 2026
<!-- 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

Controls replaces the core `Button.Text` mapper on iOS/MacCatalyst so it
can handle Controls-specific behavior such as `TextTransform` and
`ContentLayout`. That Controls mapper updated the native `UIButton`
title but did not rebuild the attributed title used when
`CharacterSpacing` is applied, so UIKit could continue displaying the
previous `CurrentAttributedTitle` after `Button.Text` changed.

### Description of Change

After Controls updates the native button text on iOS/MacCatalyst, it now
reapplies the core button formatting mapper so the attributed title is
rebuilt from the latest text.

The iOS Controls `UIButton.UpdateText` helper also keeps
`TitleLabel.Text` synchronized with the transformed text for every text
update. This gives `UpdateCharacterSpacing` the current text when it
rebuilds the attributed title.

### Key Technical Details

- `Button.iOS.cs` now calls `ButtonHandler.MapFormatting(handler,
button)` after `UpdateText(button)`.
- `ButtonExtensions.UpdateText` now assigns
`platformButton.TitleLabel.Text = text` for all text updates, not only
when the logical `Button.Text` is empty.
- The regression test checks the native `CurrentAttributedTitle` text
and kerning after `Text` changes with `CharacterSpacing` applied.

### Edge Cases Covered

| Scenario | Coverage |
| --- | --- |
| `CharacterSpacing` + text update | Device test and external repro |
| `CharacterSpacing` + `ContentLayout` + text update | Device test and
external repro |
| `CharacterSpacing` + `TextTransform` + text update | Device test and
external repro |

@tdeborde2 @weases could you please try the PR artifacts when CI
publishes them and confirm whether this resolves the issue in your apps?

### Issues Fixed

Fixes #21488

### Validation

- Reproduced the issue with the external repro project from #21488 on
.NET 10 / MAUI 10.0.80.
- Verified the same repro passes when rebuilt against the fixed local
MAUI artifacts, including CharacterSpacing, CharacterSpacing +
ContentLayout, and CharacterSpacing + TextTransform cases.
- Ran Controls Button device tests on MacCatalyst: 21/21 passed.
- Built the iOS Controls device-test app successfully.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 29, 2026
<!-- 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

Controls replaces the core `Button.Text` mapper on iOS/MacCatalyst so it
can handle Controls-specific behavior such as `TextTransform` and
`ContentLayout`. That Controls mapper updated the native `UIButton`
title but did not rebuild the attributed title used when
`CharacterSpacing` is applied, so UIKit could continue displaying the
previous `CurrentAttributedTitle` after `Button.Text` changed.

### Description of Change

After Controls updates the native button text on iOS/MacCatalyst, it now
reapplies the core button formatting mapper so the attributed title is
rebuilt from the latest text.

The iOS Controls `UIButton.UpdateText` helper also keeps
`TitleLabel.Text` synchronized with the transformed text for every text
update. This gives `UpdateCharacterSpacing` the current text when it
rebuilds the attributed title.

### Key Technical Details

- `Button.iOS.cs` now calls `ButtonHandler.MapFormatting(handler,
button)` after `UpdateText(button)`.
- `ButtonExtensions.UpdateText` now assigns
`platformButton.TitleLabel.Text = text` for all text updates, not only
when the logical `Button.Text` is empty.
- The regression test checks the native `CurrentAttributedTitle` text
and kerning after `Text` changes with `CharacterSpacing` applied.

### Edge Cases Covered

| Scenario | Coverage |
| --- | --- |
| `CharacterSpacing` + text update | Device test and external repro |
| `CharacterSpacing` + `ContentLayout` + text update | Device test and
external repro |
| `CharacterSpacing` + `TextTransform` + text update | Device test and
external repro |

@tdeborde2 @weases could you please try the PR artifacts when CI
publishes them and confirm whether this resolves the issue in your apps?

### Issues Fixed

Fixes #21488

### Validation

- Reproduced the issue with the external repro project from #21488 on
.NET 10 / MAUI 10.0.80.
- Verified the same repro passes when rebuilt against the fixed local
MAUI artifacts, including CharacterSpacing, CharacterSpacing +
ContentLayout, and CharacterSpacing + TextTransform cases.
- Ran Controls Button device tests on MacCatalyst: 21/21 passed.
- Built the iOS Controls device-test app successfully.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Aug 7, 2026
<!-- 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

Controls replaces the core `Button.Text` mapper on iOS/MacCatalyst so it
can handle Controls-specific behavior such as `TextTransform` and
`ContentLayout`. That Controls mapper updated the native `UIButton`
title but did not rebuild the attributed title used when
`CharacterSpacing` is applied, so UIKit could continue displaying the
previous `CurrentAttributedTitle` after `Button.Text` changed.

### Description of Change

After Controls updates the native button text on iOS/MacCatalyst, it now
reapplies the core button formatting mapper so the attributed title is
rebuilt from the latest text.

The iOS Controls `UIButton.UpdateText` helper also keeps
`TitleLabel.Text` synchronized with the transformed text for every text
update. This gives `UpdateCharacterSpacing` the current text when it
rebuilds the attributed title.

### Key Technical Details

- `Button.iOS.cs` now calls `ButtonHandler.MapFormatting(handler,
button)` after `UpdateText(button)`.
- `ButtonExtensions.UpdateText` now assigns
`platformButton.TitleLabel.Text = text` for all text updates, not only
when the logical `Button.Text` is empty.
- The regression test checks the native `CurrentAttributedTitle` text
and kerning after `Text` changes with `CharacterSpacing` applied.

### Edge Cases Covered

| Scenario | Coverage |
| --- | --- |
| `CharacterSpacing` + text update | Device test and external repro |
| `CharacterSpacing` + `ContentLayout` + text update | Device test and
external repro |
| `CharacterSpacing` + `TextTransform` + text update | Device test and
external repro |

@tdeborde2 @weases could you please try the PR artifacts when CI
publishes them and confirm whether this resolves the issue in your apps?

### Issues Fixed

Fixes #21488

### Validation

- Reproduced the issue with the external repro project from #21488 on
.NET 10 / MAUI 10.0.80.
- Verified the same repro passes when rebuilt against the fixed local
MAUI artifacts, including CharacterSpacing, CharacterSpacing +
ContentLayout, and CharacterSpacing + TextTransform cases.
- Ran Controls Button device tests on MacCatalyst: 21/21 passed.
- Built the iOS Controls device-test app successfully.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 9, 2026
@github-actions github-actions Bot modified the milestones: .NET 10 SR9, .NET 10 SR11 Sep 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-button Button, ImageButton platform/ios platform/macos macOS / Mac Catalyst s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button text does not update when CharacterSpacing is applied

4 participants