Visual state change for disabled RadioButton#23471
Visual state change for disabled RadioButton#23471kubaflo merged 11 commits intodotnet:inflight/currentfrom
Conversation
|
This looks good! Would you mind writing a test for it as well? :) |
|
@dustin-wojciechowski of course, I will write the test as soon as I find some time :) |
|
@dustin-wojciechowski I've added a UI test :) |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
f037a64 to
db28cc0
Compare
|
/rebase |
db28cc0 to
21ed209
Compare
| { | ||
| App.WaitForElement("button"); | ||
| App.Click("button"); | ||
|
|
There was a problem hiding this comment.
Could the test change the theme and verify the disabled RadioButton on Light and Dark theme?
| { | ||
| Property = Grid.OpacityProperty, | ||
| TargetName = "Grid", | ||
| Value = 0.4f |
There was a problem hiding this comment.
Should be a different value based on the system theme?
There was a problem hiding this comment.
I think app theme is indifferent to opacity
6c0fa22 to
5b0c103
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
…lView (dotnet#34279) > [!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 PR dotnet#33281 added a `GetDesiredSize()` override in `LabelHandler.Android.cs` to fix issue dotnet#31782 (WordWrap labels reporting full constraint width instead of actual text width). The fix computes the longest wrapped line and returns that as the desired width. This causes a regression when `MaxLines` is set on the label: 1. `GetDesiredSize()` is called at the full available width — text wraps cleanly within MaxLines limit 2. The fix returns the shorter "longest line" width 3. The label is arranged at that narrower width 4. At the narrower width, the same text needs more lines — exceeding MaxLines → text is clipped ### Description of Change The `GetDesiredSize()` override now uses a double-measurement strategy: 1. **Entry guard**: Only applies the width-narrowing when `Ellipsize == null` (no active truncation). 2. **Compute candidate width**: Finds the widest rendered line as before. 3. **Safety check** (only when `MaxLines` is explicitly set): Re-measures the TextView at exactly the narrowed pixel width. If the re-measurement shows the text would now exceed `MaxLines`, the original full width is returned instead. 4. **Narrow when safe**: If the re-measurement confirms the same or fewer lines, the narrowed width is returned — preserving the dotnet#31782 alignment fix even for labels with explicit `MaxLines`. This avoids both regressions: - Labels without `MaxLines` behave as before (alignment fix preserved, no second measure). - Labels with `MaxLines` that have line-count headroom also get the alignment fix. ### Issues Fixed Fixes dotnet#34120 ### Tested platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac **Files Changed in this PR:** | File | Change | |------|--------| | `src/Core/src/Handlers/Label/LabelHandler.Android.cs` | Double-measurement fix (~20 lines) | | `src/Controls/tests/TestCases.HostApp/Issues/Issue34120.cs` | New UI test HostApp page | | `src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34120.cs` | New NUnit UI test | **Regression Reference:** - Regressed by: PR dotnet#33281 - Introduced in: 10.0.40 - Works in: 10.0.30, 10.0.31 - Platform: Android only ### Screenshots |Before|After| |--|--| |<img width="540" alt="image" src="https://github.com/user-attachments/assets/4c365c06-6aa9-4471-9553-d46983ec66c7" >|<img width="540" alt="image" src="https://github.com/user-attachments/assets/d67723d9-fd79-4dcc-8451-f1537f8b3668" >|
- Add android-arm64 and android-x64 test cases to PublishNativeAOT and PublishNativeAOTRootAllMauiAssemblies tests - Add PrepareNativeAotBuildPropsAndroid() with Android-specific build properties including ANDROID_NDK_ROOT support - Add ExpectedNativeAOTWarningsAndroid baseline (XA1040 + IL3050 warnings) - Use OnlyAndroid() helper on Linux to avoid iOS/macCatalyst workload issues --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nd pixel-level comparison (dotnet#34024) <!-- 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 `SafeAreaInsetsDidChange` fires repeatedly during iOS animations (e.g., `TranslateToAsync`, bottom sheet transitions) as views move relative to the window. This caused two distinct infinite loop patterns: 1. **Sub-pixel oscillation** (dotnet#32586, dotnet#33934): Animations produce sub-pixel differences in `SafeAreaInsets` (e.g., `0.0000001pt`). Exact equality fails, triggering `InvalidateAncestorsMeasures` → layout pass → position change → new `SafeAreaInsetsDidChange` → infinite loop. 2. **Parent-child double application** (dotnet#33595): A `ContentPage` (implementing `ISafeAreaView`) and its child `Grid` both independently apply safe area adjustments. When the `ContentPage` adjusts its layout for the notch/status bar, it repositions the `Grid`. The `Grid`'s new position fires `SafeAreaInsetsDidChange`, causing it to re-apply its own adjustment — creating a ping-pong loop. ### Description of Change **Primary fix — `IsParentHandlingSafeArea` (parent hierarchy walk):** In both `MauiView.ValidateSafeArea` and `MauiScrollView.ValidateSafeArea`, before applying safe area adjustments, we now check whether an ancestor `MauiView` is already applying safe area for the **same edges**. If so, the child skips its own adjustment to avoid double-padding. The check is **edge-aware**: a parent handling `Top` does not block a child from independently handling `Bottom`. Only overlapping edges cause deferral. The `_parentHandlesSafeArea` result is cached per layout cycle and cleared on `SafeAreaInsetsDidChange`, `InvalidateSafeArea`, and `MovedToWindow`. **Secondary fix — `EqualsAtPixelLevel`:** Safe area values are compared at device-pixel resolution (rounding to `1 / ContentScaleFactor`) before deciding whether to trigger a layout invalidation. This absorbs sub-pixel animation noise and prevents the oscillation loops in dotnet#32586 and dotnet#33934. **MauiScrollView bug fixes:** - Inverted condition: `!UpdateContentInsetAdjustmentBehavior()` was incorrectly gating behavior; corrected to `UpdateContentInsetAdjustmentBehavior()`. - The `_appliesSafeAreaAdjustments` flag now correctly incorporates `!IsParentHandlingSafeArea()`. **What was removed:** - The "Window Guard" approach (comparing `Window.SafeAreaInsets` to filter noise) was tried and removed. It was fragile: on macCatalyst with a custom TitleBar, `WindowViewController` repositions content by pushing it down, which changes the view's own `SafeAreaInsets` without changing `Window.SafeAreaInsets`. The guard blocked this legitimate change, causing a 28px content shift regression in CI. ### Issues Fixed Fixes dotnet#32586 Fixes dotnet#33934 Fixes dotnet#33595 Fixes dotnet#34042 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Tamilarasan-Paranthaman <Tamilarasan-Paranthaman@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 23471Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 23471" |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
…t#34405) The MauiXamlHotReload MSBuild property was introduced in dotnet#34028 but was not registered as a compiler-visible property. Without this entry, Roslyn source generators cannot read the property value via AnalyzerConfigOptions.GlobalOptions. This change makes it accessible so IDE and source generators can adjust their behavior based on the configured hot reload mode (Legacy or SourceGen). Co-authored-by: Kirill Ovchinnikov <kovchinnikov@microsoft.com>
Add platform-specific snapshot images for TestIssue18668 (Android, Mac, WinUI, iOS and ios-26) under src/Controls/tests/TestCases.*. Also update the existing Mac snapshot RadioButtonWithValueChangeSelected.png. These are visual-test updates to cover/fix issue dotnet#18668 across test targets.
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Add TestIssue18668 visual test snapshots ·
|
| File:Line | Reviewer Says | Author Says | Status |
|---|---|---|---|
Issue18668.cs:19 |
Should test Light and Dark theme | Opacity is theme- Unresolved | independent |
RadioButton.cs:640 |
Should opacity differ by theme | App theme is indifferent to Unresolved | opacity |
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #23471 | Add Disabled VSM state with Grid.Opacity = 0.4f to default RadioButton PENDING (Gate) |
RadioButton.cs (+10, -1) |
Cross-platform fix via default template | template |
🚦 Gate — Test Verification
📝 Review Session — Add TestIssue18668 visual test snapshots · 5f78785
Result PASSED:
Platform: ios
Mode: Full Verification
- Tests FAIL without fix
- Tests PASS with fix
Test: Issue18668 - TestIssue18668() - screenshot verification of disabled RadioButton opacity
🔧 Fix — Analysis & Comparison
📝 Review Session — Add TestIssue18668 visual test snapshots · 5f78785
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (claude-sonnet-4.6) | Imperative in and | PASS | RadioButton.cs (+13) |
Works but bypasses VSM entirely |
| 2 | try-fix (claude-opus-4.6) | Data binding with on template root | PASS | RadioButton.cs (+15) |
MAUI-idiomatic but adds a converter class |
| 3 | try-fix (gpt-5.2) | Per-element VSM opacity setters (ellipse, checkmark, contentPresenter) + for checkmark toggle | PASS | RadioButton.cs (+~20) |
More surgical but more complex; changes checkmark toggle mechanism |
| 4 | try-fix (gpt-5.3-codex) | iOS handler-level / with when disabled | PASS | RadioButtonHandler.cs (+4), RadioButtonHandler.iOS.cs (+14) |
Platform-specific; modifies handler files rather than shared code |
| 5 | try-fix (gemini-3-pro-preview) | Imperative in behind guard | PASS | RadioButton.cs (+18) |
iOS-only guard is a concern; coupling to template structure in code |
| (separate from VSM pipeline) | PASS | RadioButton.cs (+7) |
Clean declarative; Trigger reverts automatically when re-enabled | ||
| PR | PR #23471 | VSM state setter: via in | PASS (Gate) | RadioButton.cs (+10, -1) |
Original PR; pure VSM declaration; minimal, idiomatic |
Exhausted: Yes (2 cross-pollination rounds; 2/5 models confirmed NO NEW IDEAS in round 2; remaining ideas are color-based/timing variations)
Selected Fix: PR's It is the simplest, most idiomatic approach: pure VSM declaration that slots naturally into the existing VSM infrastructure already present in BuildDefaultTemplate(). All alternatives either add complexity (converter classes, handler overrides, platform guards) or change unrelated behavior (checkmark visibility mechanism). The PR's approach is minimal, cross-platform, and consistent with the existing code style.fix
Cross-Pollination Summary
ran Attempt 6 (Trigger approach)
Round 2: 2/5 NO NEW IDEAS; remaining suggestions were color-based (Stroke/Fill) and timing incremental, not fundamental; max exploration reachedvariations
📋 Report — Final Recommendation
📝 Review Session — Add TestIssue18668 visual test snapshots · 5f78785
Final Recommendation: APPROVE (with minor code quality notes)
Summary
PR #23471 fixes a real bug (issue #18668) where the RadioButton's disabled visual state had no iOS showed no visual change when IsEnabled = false while Android worked correctly. The fix adds a Disabled VSM state with Grid.Opacity = 0.4f to the default RadioButton template. Gate verification confirmed tests correctly catch the bug: they fail without the fix and pass with the fix. Six independent try-fix approaches were explored; all six passed, confirming multiple viable solutions. The PR's approach was selected as the simplest and most idiomatic.setters
Root Cause
The default RadioButton template (BuildDefaultTemplate) declared a Disabled VisualState but with no the state existed but had no visual effect. When IsEnabled = false, the VSM transitioned to the Disabled state successfully, but nothing changed visually. Android has platform-specific handler behavior that applied disabled appearance independently of VSM; iOS did not, exposing the gap in the shared template.setters
Fix Quality Correct Approach:
The PR adds:
nameScope.RegisterName("Grid", registers the inner Grid so VSM can target itgrid)- A
Setterin theDisabledstate:Grid.OpacityProperty = 0.4fonTargetName = "Grid"
This is the minimal, idiomatic fix: pure VSM declaration in BuildDefaultTemplate, consistent with the existing Checked/Unchecked state setters already in the same method. Six alternative approaches (imperative, binding, trigger, per-element, platform handler, platform-guarded) all passed tests, validating that the fix space is correct. The PR's declarative VSM approach is the simplest.
Code Review Findings
The new code block mixes tab-indented first line with space-indented subsequent lines:####
// Line 1: tab-indented (correct)
VisualState disabledVisualState = new VisualState() { Name = VisualStateManager.CommonStates.Disabled };
// Lines 2-8: space-indented (inconsistent with surrounding code using tabs)
disabledVisualState.Setters.Add(
new Setter()
{
Property = Grid.OpacityProperty,
TargetName = "Grid",
Value = 0.4f
});
common.States.Add(disabledVisualState);Recommendation: Convert the indentation to tabs to match the rest of the file (and the surrounding Checked/Unchecked setters pattern).
An existing Mac test snapshot (RadioButtonWithValueChangeSelected.png) was modified in this PR. This could be a legitimate ripple effect from the opacity change affecting a pre-existing checked RadioButton, or it could be an unintended regression. The PR description does not mention this. Recommend: author should confirm this snapshot change is expected and intentional.####
VerifyScreenshot() is the correct pattern
- Screenshot-based verification is appropriate for this visual bug
[Category(UITestCategories.RadioButton)]is correct- Platform snapshots added for iOS, iOS-26, Android, Mac, good cross-platform coverageWindows
The PR description is minimal (no NOTE block). The required NOTE block for community testing should be added:####
> [!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!PR Title Assessment
Current: "Visual state change for disabled RadioButton"
Assessment: Acceptable. Could be more specific (RadioButton: Add Disabled visual state opacity) but current title is clear enough. The issue is cross-platform so no platform tag is warranted.
Open Review Threads Assessment
Two unresolved threads from jsuarezruiz:
Author is correct: opacity reduction is theme-agnostic. Light and dark mode images both show the same 0.4 opacity result looks good. No change needed.
Author is correct: since the fix is opacity-only and theme-independent, separate theme tests add no value. No change needed.
Verification Results
| Check | Result |
|---|---|
| Gate: Tests FAIL without fix | |
| Gate: Tests PASS with fix | |
| Platform tested | iOS |
| try-fix: 6 independent approaches | All PASS |
| Selected fix | PR's fix (simplest, most idiomatic) |
📋 Expand PR Finalization Review
Title: ✅ Good
Current: Visual state change for disabled RadioButton
Description: ✅ Good
Description needs updates. See details below.
✨ Suggested PR Description
[!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
The default RadioButton template (BuildDefaultTemplate() in RadioButton.cs) declared a Disabled VisualState but with no setters. When IsEnabled = false, the VisualStateManager successfully transitioned to the Disabled state, but nothing changed visually because no property was being set. Android's platform handler independently applied disabled appearance; iOS and MacCatalyst did not, so the RadioButton appeared fully active even when disabled.
Description of Change
Adds a visual disabled state to the RadioButton default template:
RadioButton.cs—BuildDefaultTemplate():- Registers
"Grid"in the template's NameScope so the VisualStateManager can target it by name - Adds a
Setterto theDisabledVisualState that reducesGrid.Opacityto0.4f, giving a clear visual indication that the control is disabled
- Registers
The change is in the shared cross-platform template, so all platforms benefit: iOS, Android, macOS/MacCatalyst, and Windows will all show the opacity reduction when a RadioButton is disabled.
Note: An existing Mac snapshot (RadioButtonWithValueChangeSelected.png) was also updated as a side-effect of this change — the new opacity registration may affect how the Mac renders the selected state visually.
Issues Fixed
Fixes #18668
Platforms Tested
- iOS
- Android
- macOS / MacCatalyst
- Windows
Code Review: ✅ Passed
Code Review — PR #23471
PR: Visual state change for disabled RadioButton
🟡 Minor Issues
1. Indentation Inconsistency
File: src/Controls/src/Core/RadioButton/RadioButton.cs
Lines: 636–644 (the new Disabled VSM block)
The new code uses 4-space indentation, while the rest of BuildDefaultTemplate() (and the file overall) uses tabs. This creates a mixed-indentation block that is inconsistent with the surrounding code style.
Current (problematic):
// Tab-indented (correct, matches surrounding code):
VisualState disabledVisualState = new VisualState() { Name = VisualStateManager.CommonStates.Disabled };
// Space-indented (inconsistent):
disabledVisualState.Setters.Add(
new Setter()
{
Property = Grid.OpacityProperty,
TargetName = "Grid",
Value = 0.4f
});
common.States.Add(disabledVisualState);Recommendation: Convert the space-indented lines to tabs to match the rest of the file. The dotnet format command should catch this:
dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA18222. Modified Unrelated Mac Snapshot — Needs Confirmation
File: src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/RadioButtonWithValueChangeSelected.png
This pre-existing snapshot was modified by this PR. The PR description does not mention this change. This could mean:
- The opacity change to the Grid inadvertently affects how the normal/selected state renders on Mac (e.g., due to how the NameScope registration changes template behavior), or
- It is a legitimate rendering update that just needed a baseline refresh.
Recommendation: The author should explicitly confirm in the PR that this snapshot change is expected and intentional, and briefly explain why the selected-state visual changed. If unexpected, the root cause should be investigated before merging.
✅ Looks Good
- Fix approach is idiomatic: Using the VisualStateManager with a declarative
SetterinBuildDefaultTemplate()is the correct, minimal pattern consistent with the existing Checked/Unchecked state infrastructure in the same method. - NameScope registration is correct:
nameScope.RegisterName("Grid", grid)follows the same pattern already used forUncheckedButton,CheckedIndicator, andContentPresenter. - Opacity value (0.4f): A reasonable disabled-state opacity. It is theme-independent, which is correct — opacity reduction works equally well on light and dark backgrounds.
- Cross-platform test coverage: Screenshot snapshots added for iOS, iOS-26, Android, Mac, and Windows — good coverage for a visual change.
- Test structure:
VerifyScreenshot()after disabling is the correct pattern for a visual regression test.[Category(UITestCategories.RadioButton)]is appropriate.
ℹ️ Context: Open Review Threads
There are two unresolved review threads from reviewer jsuarezruiz:
| Thread | Reviewer Question | Author Response | Assessment |
|---|---|---|---|
Issue18668.cs:19 |
Should the test verify both Light and Dark theme? | Opacity is theme-independent; dark/light look the same with 0.4 opacity | Author is correct — opacity reduction is visually consistent across themes. No separate theme test is needed. |
RadioButton.cs:640 |
Should opacity differ by system theme? | App theme is indifferent to opacity | Author is correct — using a fixed 0.4f opacity regardless of theme is the right approach for a disabled state indicator. |
Both threads can be resolved without code changes. The author's reasoning is sound.
### Description of Change Fixes #18668 Fixes #18668 (comment) |iOS|Android| |--|--| |<video src="https://github.com/dotnet/maui/assets/42434498/114acec7-3cf8-4454-941a-fc75e536d8e3" width="300px"/>|<video src="https://github.com/dotnet/maui/assets/42434498/d2b8ad82-067a-4c24-b4da-e41fadb426d4" width="300px"/>|
### Description of Change Fixes #18668 Fixes #18668 (comment) |iOS|Android| |--|--| |<video src="https://github.com/dotnet/maui/assets/42434498/114acec7-3cf8-4454-941a-fc75e536d8e3" width="300px"/>|<video src="https://github.com/dotnet/maui/assets/42434498/d2b8ad82-067a-4c24-b4da-e41fadb426d4" width="300px"/>|
### Description of Change Fixes #18668 Fixes #18668 (comment) |iOS|Android| |--|--| |<video src="https://github.com/dotnet/maui/assets/42434498/114acec7-3cf8-4454-941a-fc75e536d8e3" width="300px"/>|<video src="https://github.com/dotnet/maui/assets/42434498/d2b8ad82-067a-4c24-b4da-e41fadb426d4" width="300px"/>|
### Description of Change Fixes #18668 Fixes #18668 (comment) |iOS|Android| |--|--| |<video src="https://github.com/dotnet/maui/assets/42434498/114acec7-3cf8-4454-941a-fc75e536d8e3" width="300px"/>|<video src="https://github.com/dotnet/maui/assets/42434498/d2b8ad82-067a-4c24-b4da-e41fadb426d4" width="300px"/>|
### Description of Change Fixes #18668 Fixes #18668 (comment) |iOS|Android| |--|--| |<video src="https://github.com/dotnet/maui/assets/42434498/114acec7-3cf8-4454-941a-fc75e536d8e3" width="300px"/>|<video src="https://github.com/dotnet/maui/assets/42434498/d2b8ad82-067a-4c24-b4da-e41fadb426d4" width="300px"/>|
## What's Coming .NET MAUI inflight/candidate introduces significant improvements across all platforms with focus on quality, performance, and developer experience. This release includes 66 commits with various improvements, bug fixes, and enhancements. ## Activityindicator - [Android] Implemented material3 support for ActivityIndicator by @Dhivya-SF4094 in #33481 <details> <summary>🔧 Fixes</summary> - [Implement material3 support for ActivityIndicator](#33479) </details> - [iOS] Fix: ActivityIndicator IsRunning ignores IsVisible when set to true by @bhavanesh2001 in #28983 <details> <summary>🔧 Fixes</summary> - [[iOS] [ActivityIndicator] `IsRunning` ignores `IsVisible` when set to `true`](#28968) </details> ## Button - [iOS] Button RTL text and image overlap - fix by @kubaflo in #29041 ## Checkbox - [iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null by @Ahamed-Ali in #34284 <details> <summary>🔧 Fixes</summary> - [[iOS] Color of the checkBox control is not properly worked on dynamic scenarios](#34278) </details> ## CollectionView - [iOS] Fix: CollectionView does not clear selection when SelectedItem is set to null by @Tamilarasan-Paranthaman in #30420 <details> <summary>🔧 Fixes</summary> - [CollectionView not being able to remove selected item highlight on iOS](#30363) - [[MAUI] Select items traces are preserved](#26187) </details> - [iOS] CV2 ItemsLayout update by @kubaflo in #28675 <details> <summary>🔧 Fixes</summary> - [CollectionView CollectionViewHandler2 doesnt change ItemsLayout on DataTrigger](#28656) - [iOS CollectionView doesn't respect a change to ItemsLayout when using Items2.CollectionViewHandler2](#31259) </details> - [iOS][CV2] Fix CollectionView renders large empty space at bottom of view by @devanathan-vaithiyanathan in #31215 <details> <summary>🔧 Fixes</summary> - [[iOS] [MacCatalyst] CollectionView renders large empty space at bottom of view](#17799) - [[iOS/Mac] CollectionView2 EmptyView takes up large horizontal space even when the content is small](#33201) </details> - [iOS] Fixed issue where group Header/Footer template was set to all items when IsGrouped was true for an ObservableCollection by @Tamilarasan-Paranthaman in #29144 <details> <summary>🔧 Fixes</summary> - [[iOS] Group Header/Footer Repeated for All Items When IsGrouped is True for ObservableCollection in CollectionView](#29141) </details> - [Android] Fix CollectionView selection crash with HeaderTemplate by @NirmalKumarYuvaraj in #34275 <details> <summary>🔧 Fixes</summary> - [[Bug] [Android] System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index](#34247) </details> ## DateTimePicker - [iOS] Fix TimePicker AM/PM frequently changes when the app is closed and reopened by @devanathan-vaithiyanathan in #31066 <details> <summary>🔧 Fixes</summary> - [[iOS] TimePicker AM/PM frequently changes when the app is closed and reopened](#30837) - [Maui 10 iOS TimePicker Strange Characters in place of AM/PM](#33722) </details> - Android TimePicker ignores 24 hour system setting when using Format Property - fix by @kubaflo in #28797 <details> <summary>🔧 Fixes</summary> - [Android TimePicker ignores 24 hour system setting when using Format Property](#28784) </details> ## Drawing - [iOS, Mac, Windows] GraphicsView: Fix Background/BackgroundColor not updating by @NirmalKumarYuvaraj in #31254 <details> <summary>🔧 Fixes</summary> - [[iOS, Mac, Windows] GraphicsView does not change the Background/BackgroundColor](#31239) </details> - [iOS] GraphicsView DrawString - fix by @kubaflo in #26304 <details> <summary>🔧 Fixes</summary> - [DrawString not rendering in iOS.](#24450) - [GraphicsView DrawString not rendering in iOS](#8486) - [DrawString doesn't work on maccatalyst](#4993) </details> - [Android] - Fix Shadow Rendering For Transparent Fill, Stroke (Lines), and Text on Shapes by @prakashKannanSf3972 in #29528 <details> <summary>🔧 Fixes</summary> - [Ellipse Transparency Not Rendered When Drawing Arc Inside the Ellipse Using GraphicsView on Android](#29394) </details> - Revert "[iOS, Mac, Windows] GraphicsView: Fix Background/BackgroundColor not updating (#31254)" by @Ahamed-Ali via @Copilot in #34508 ## Entry - [iOS 26] Fix Entry MaxLength not enforced due to new multi-range delegate by @kubaflo in #32045 <details> <summary>🔧 Fixes</summary> - [iOS 26 - The MaxLength property value is not respected on an Entry control.](#32016) - [.NET MAUI Entry Maximum Length not working on iOS and macOS](#33316) </details> - [iOS] Fixed Entry with IsPassword toggling loses previously entered text by @SubhikshaSf4851 in #30572 <details> <summary>🔧 Fixes</summary> - [Entry with IsPassword toggling loses previously entered text on iOS when IsPassword is re-enabled](#30085) </details> ## Essentials - Fix for FilePicker PickMultipleAsync nullable reference type by @SuthiYuvaraj in #33163 <details> <summary>🔧 Fixes</summary> - [FilePicker PickMultipleAsync nullable reference type](#33114) </details> - Replace deprecated NetworkReachability with NWPathMonitor on iOS/macOS by @jfversluis via @Copilot in #32354 <details> <summary>🔧 Fixes</summary> - [NetworkReachability is obsolete on iOS/maccatalyst 17.4+](#32312) - [Use NWPathMonitor on iOS for Essentials Connectivity](#2574) </details> ## Essentials Connectivity - Update Android Connectivity implementation to use modern APIs by @jfversluis via @Copilot in #30348 <details> <summary>🔧 Fixes</summary> - [Update the Android Connectivity implementation to user modern APIs](#30347) </details> ## Flyout - [iOS] Fixed Flyout icon not updating when root page changes using InsertPageBefore by @Vignesh-SF3580 in #29924 <details> <summary>🔧 Fixes</summary> - [[iOS] Flyout icon not replaced by back button when root page is changed using InsertPageBefore](#29921) </details> ## Flyoutpage - [iOS] Flyout Items Not Displayed in RightToLeft FlowDirection in Landscape - fix by @kubaflo in #26762 <details> <summary>🔧 Fixes</summary> - [Flyout Items Not Displayed in RightToLeft FlowDirection on iOS in Landscape Orientation and Hamburger Icon Positioned Incorrectly](#26726) </details> ## Image - [Android] Implemented Material3 support for Image by @Dhivya-SF4094 in #33661 <details> <summary>🔧 Fixes</summary> - [Implement Material3 support for Image](#33660) </details> ## Keyboard - [iOS] Fix gap at top of view after rotating device while Entry keyboard is visible by @praveenkumarkarunanithi in #34328 <details> <summary>🔧 Fixes</summary> - [Focusing and entering texts on entry control causes a gap at the top after rotating simulator.](#33407) </details> ## Label - [Android] Support for images inside HTML label by @kubaflo in #21679 <details> <summary>🔧 Fixes</summary> - [Label with HTML TextType does not display images on Android](#21044) </details> - [fix] ContentLabel Moved to a nested class to prevent CS0122 in external source generators by @SubhikshaSf4851 in #34514 <details> <summary>🔧 Fixes</summary> - [[MAUI] Building Maui App with sample content results CS0122 errors.](#34512) </details> ## Layout - Optimize ordering of children in Flex layout by @symbiogenesis in #21961 - [Android] Fix control size properties not available during Loaded event by @Vignesh-SF3580 in #31590 <details> <summary>🔧 Fixes</summary> - [CollectionView on Android does not provide height, width, logical children once loaded, works fine on Windows](#14364) - [Control's Loaded event invokes before calling its measure override method.](#14160) </details> ## Mediapicker - [iOS/Android] MediaPicker: Fix image orientation when RotateImage=true by @michalpobuta in #33892 <details> <summary>🔧 Fixes</summary> - [MediaPicker.PickPhotosAsync does not preserve image orientation](#32650) </details> ## Modal - [Windows] Fix modal page keyboard focus not shifting to newly opened modal by @jfversluis in #34212 <details> <summary>🔧 Fixes</summary> - [Keyboard focus does not shift to a newly opened modal page: Pressing enter clicks the button on the page beneath the modal page](#22938) </details> ## Navigation - [iOS26] Apply view margins in title view by @kubaflo in #32205 <details> <summary>🔧 Fixes</summary> - [NavigationPage TitleView iOS 26](#32200) </details> - [iOS] System.NullReferenceException at NavigationRenderer.SetStatusBarStyle() by @kubaflo in #29564 <details> <summary>🔧 Fixes</summary> - [System.NullReferenceException at NavigationRenderer.SetStatusBarStyle()](#29535) </details> - [iOS 26] Fix back button color not applied for NavigationPage by @Shalini-Ashokan in #34326 <details> <summary>🔧 Fixes</summary> - [[iOS] Color not applied to the Back button text or image on iOS 26](#33966) </details> ## Picker - Fix Picker layout on Mac Catalyst 26+ by @kubaflo in #33146 <details> <summary>🔧 Fixes</summary> - [[MacOS 26] Text on picker options are not centered on macOS 26.1](#33229) </details> ## Progressbar - [Android] Implemented Material3 support for ProgressBar by @SyedAbdulAzeemSF4852 in #33926 <details> <summary>🔧 Fixes</summary> - [Implement Material3 support for Progressbar](#33925) </details> ## RadioButton - [iOS, Mac] Fix for RadioButton TextColor for plain Content not working by @HarishwaranVijayakumar in #31940 <details> <summary>🔧 Fixes</summary> - [RadioButton: TextColor for plain Content not working on iOS](#18011) </details> - [All Platforms] Fix RadioButton warning when ControlTemplate is set with View content by @kubaflo in #33839 <details> <summary>🔧 Fixes</summary> - [Seeking clarification on RadioButton + ControlTemplate + Content documentation](#33829) </details> - Visual state change for disabled RadioButton by @kubaflo in #23471 <details> <summary>🔧 Fixes</summary> - [RadioButton disabled UI issue - iOS](#18668) </details> ## SafeArea - [Android] Fix for TabbedPage BottomNavigation BarBackgroundColor not extending to system navigation bar by @praveenkumarkarunanithi in #33428 <details> <summary>🔧 Fixes</summary> - [[Android] TabbedPage BottomNavigation BarBackgroundColor does not extend to system navigation bar area in Edge-to-Edge mode](#33344) </details> ## ScrollView - [Android] ScrollView: Fix HorizontalScrollBarVisibility not updating immediately at runtime by @SubhikshaSf4851 in #33528 <details> <summary>🔧 Fixes</summary> - [Runtime Scrollbar visibility not updating correctly on Android and macOS platforms.](#33400) </details> - Fixed crash when calling ItemsView.ScrollTo on unloaded CollectionView by @kubaflo in #25444 <details> <summary>🔧 Fixes</summary> - [App crashes when calling ItemsView.ScrollTo on unloaded CollectionView](#23014) </details> ## Shell - [Shell] Update logic for iOS large title display in ShellItemRenderer by @kubaflo in #33246 - [iOS][Shell] Fix navigation lifecycle and back button for More tab (>5 tabs) by @kubaflo in #27932 <details> <summary>🔧 Fixes</summary> - [OnAppearing and OnNavigatedTo does not work when using extended Tabbar (tabbar with more than 5 tabs) on IOS.](#27799) - [Shell.BackButtonBehavior does not work when using extended Tabbar (tabbar with more than 5 tabs)on IOS.](#27800) - [Shell TabBar More button causes ViewModel command binding disconnection on back navigation](#30862) - [Content page onappearing not firing if tabs are on the more tab on IOS](#31166) </details> - [iOS 26] Fix tab bar ghosting when navigating from modal to tabbed Shell content by @SubhikshaSf4851 in #34254 <details> <summary>🔧 Fixes</summary> - [[iOS] Tab bar ghosting issue on iOS 26 (liquid glass)](#34143) </details> - Fix for Shell tab visibility not updating when navigating back multiple pages by @BagavathiPerumal in #34403 <details> <summary>🔧 Fixes</summary> - [Changing Shell Tab Visibility when navigating back multiple pages ignores Shell Tab Visibility](#33351) </details> - [iOS/Mac] Fixed OnBackButtonPressed not firing for Shell Navigation Bar Button by @Dhivya-SF4094 in #34401 <details> <summary>🔧 Fixes</summary> - [[iOS] OnBackButtonPressed not firing for Shell Navigation Bar button](#34190) </details> ## Slider - [iOS] Fix for Slider ThumbImageSource is not centered properly on iOS 26 by @HarishwaranVijayakumar in #34019 <details> <summary>🔧 Fixes</summary> - [[iOS 26] Slider ThumbImageSource is not centered properly](#33967) </details> - [Android] Fix improper rendering of ThumbimageSource in Slider by @NirmalKumarYuvaraj in #34064 <details> <summary>🔧 Fixes</summary> - [[Slider] MAUI Slider thumb image is big on android](#13258) </details> ## Stepper - [iOS] Fix Stepper layout overlap in landscape on iOS 26 by @Vignesh-SF3580 in #34325 <details> <summary>🔧 Fixes</summary> - [[.NET10] D10 - Customize cursor position - Rotating simulator makes the button and label overlap](#34273) </details> ## SwipeView - [iOS] SwipeView: Honor FontImageSource.Color in SwipeItem icon by @kubaflo in #27389 <details> <summary>🔧 Fixes</summary> - [[iOS] SwipeView: SwipeItem.IconImageSource.FontImageSource color value not honored](#27377) </details> ## Switch - [Android] Fix Switch thumb shadow missing when ThumbColor is set by @Shalini-Ashokan in #33960 <details> <summary>🔧 Fixes</summary> - [Android Switch Control Thumb Shadow](#19676) </details> ## Toolbar - [iOS/Mac Catalyst 26] Fix Shell.ForegroundColor not applied to ToolbarItems by @SyedAbdulAzeemSF4852 in #34085 <details> <summary>🔧 Fixes</summary> - [[iOS26] Shell.ForegroundColor is not applied to ToolbarItems](#34083) </details> - [Android] VoiceOver on Toolbar Item by @kubaflo in #29596 <details> <summary>🔧 Fixes</summary> - [VoiceOver on Toolbar Item](#29573) - [SemanticProperties do not work on ToolbarItems](#23623) </details> <details> <summary>🧪 Testing (11)</summary> - [Testing] Additional Feature Matrix Test Cases for CollectionView by @TamilarasanSF4853 in #32432 - [Testing] Feature Matrix UITest Cases for VisualStateManager by @LogishaSelvarajSF4525 in #34146 - [Testing] Feature Matrix UITest Cases for Clip by @TamilarasanSF4853 in #34121 - [Testing] Feature matrix UITest Cases for Map Control by @HarishKumarSF4517 in #31656 - [Testing] Feature matrix UITest Cases for Visual Transform Control by @HarishKumarSF4517 in #32799 - [Testing] Feature Matrix UITest Cases for Shell Pages by @NafeelaNazhir in #33945 - [Testing] Feature Matrix UITest Cases for Triggers by @HarishKumarSF4517 in #34152 - [Testing] Refactoring Feature Matrix UITest Cases for CheckBox Control by @LogishaSelvarajSF4525 in #34283 - Resolve UI test Build Sample failures - Candidate March 16 by @Ahamed-Ali in #34442 - Fix the failures in the Candidate branch- March 16 by @Ahamed-Ali in #34453 <details> <summary>🔧 Fixes</summary> - [March 16th, Candidate](#34437) </details> - Fixed the iOS 18.5 Candidate failures (March 16,2026) by @Ahamed-Ali in #34593 <details> <summary>🔧 Fixes</summary> - [March 16th, Candidate](#34437) </details> </details> <details> <summary>📦 Other (2)</summary> - Fixed candidate test failures caused by PR #33428. by @Ahamed-Ali in #34515 <details> <summary>🔧 Fixes</summary> - [[.NET10] On Android, there's a big space at the top for I, M and N2 & N3](#34509) </details> - Revert "[iOS] Button RTL text and image overlap - fix (#29041)" in b0497af </details> <details> <summary>📝 Issue References</summary> Fixes #2574, Fixes #4993, Fixes #8486, Fixes #13258, Fixes #14160, Fixes #14364, Fixes #17799, Fixes #18011, Fixes #18668, Fixes #19676, Fixes #21044, Fixes #22938, Fixes #23014, Fixes #23623, Fixes #24450, Fixes #26187, Fixes #26726, Fixes #27377, Fixes #27799, Fixes #27800, Fixes #28656, Fixes #28784, Fixes #28968, Fixes #29141, Fixes #29394, Fixes #29535, Fixes #29573, Fixes #29921, Fixes #30085, Fixes #30347, Fixes #30363, Fixes #30837, Fixes #30862, Fixes #31166, Fixes #31239, Fixes #31259, Fixes #32016, Fixes #32200, Fixes #32312, Fixes #32650, Fixes #33114, Fixes #33201, Fixes #33229, Fixes #33316, Fixes #33344, Fixes #33351, Fixes #33400, Fixes #33407, Fixes #33479, Fixes #33660, Fixes #33722, Fixes #33829, Fixes #33925, Fixes #33966, Fixes #33967, Fixes #34083, Fixes #34143, Fixes #34190, Fixes #34247, Fixes #34273, Fixes #34278, Fixes #34437, Fixes #34509, Fixes #34512 </details> **Full Changelog**: main...inflight/candidate
### Description of Change Fixes dotnet#18668 Fixes dotnet#18668 (comment) |iOS|Android| |--|--| |<video src="https://github.com/dotnet/maui/assets/42434498/114acec7-3cf8-4454-941a-fc75e536d8e3" width="300px"/>|<video src="https://github.com/dotnet/maui/assets/42434498/d2b8ad82-067a-4c24-b4da-e41fadb426d4" width="300px"/>|

Description of Change
Fixes #18668
Fixes #18668 (comment)
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-07-07.at.02.01.55.mp4
Screen.Recording.2024-07-07.at.01.40.57.mov