Skip to content

[iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null#34284

Merged
kubaflo merged 1 commit intodotnet:inflight/currentfrom
Ahamed-Ali:fix-34278
Mar 10, 2026
Merged

[iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null#34284
kubaflo merged 1 commit intodotnet:inflight/currentfrom
Ahamed-Ali:fix-34278

Conversation

@Ahamed-Ali
Copy link
Copy Markdown
Contributor

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

  • The UpdateForeground method in CheckBoxExtensions.cs (iOS) only handled the case where Foreground was a SolidPaint. When Foreground was set to null (e.g., dynamically clearing the color at runtime), the method returned without doing anything. This left the previously applied CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox never reverted to its default platform tint color.

Description of Change

  • when the foreground is cleared. Setting the native CheckBoxTintColor to null causes CheckBoxTintUIColor to also become null, allowing iOS to fall back to its inherited default tint color. This ensures that dynamically clearing CheckBox.Color at runtime correctly resets the checkbox appearance on iOS/Mac Catalyst.

Issues Fixed

Fixes #34278

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix
Screen.Recording.2026-02-27.at.4.51.11.PM.mov
Screen.Recording.2026-02-27.at.7.31.44.PM.mov

@github-actions
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 -- 34284

Or

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

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 27, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review February 27, 2026 14:50
Copilot AI review requested due to automatic review settings February 27, 2026 14:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug on iOS/Mac Catalyst where the CheckBox foreground color does not reset to the platform default when the Foreground property is dynamically set to null at runtime. Previously, the UpdateForeground method in iOS's CheckBoxExtensions only handled the case where Foreground was a SolidPaint, causing the checkbox to retain its previous custom color when the foreground was cleared.

Changes:

  • Added null handling in CheckBoxExtensions.UpdateForeground (iOS) to reset CheckBoxTintColor to null when foreground is cleared
  • Added device test to verify foreground resets correctly when set to null dynamically

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Core/src/Platform/iOS/CheckBoxExtensions.cs Added else-if branch to handle null Foreground case by setting CheckBoxTintColor to null
src/Core/tests/DeviceTests/Handlers/CheckBox/CheckBoxHandlerTests.iOS.cs Added test verifying that CheckBoxTintColor becomes null after Foreground is reset to null

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Feb 28, 2026

🤖 AI Summary

📊 Expand Full Review
🔍 Pre-Flight — Context & Validation
📝 Review Session[iOS] Fixed the Reset Color issue in CheckBox · 43bc450

Issue: #34278 - [iOS] Color of the checkBox control is not properly worked on dynamic scenarios
PR: #34284 - [iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null
Platforms Affected: iOS, Mac Catalyst
Files Changed: 1 implementation file, 1 test file

Issue Summary

When CheckBox.Color is dynamically set to null at runtime on iOS/Mac Catalyst, the checkbox control retains the previously applied custom color instead of reverting to the platform default tint color. Reproducible on iOS 18 and iOS 26.

Root Cause (from PR description)

The UpdateForeground method in CheckBoxExtensions.cs (iOS) only handled the case where Foreground was a SolidPaint. When Foreground was set to null, the method exited early without doing anything, leaving the previously applied CheckBoxTintColor stuck on the native MauiCheckBox.

Files Changed

  • Fix files:
    • src/Core/src/Platform/iOS/CheckBoxExtensions.cs (+5 Added else if null-handling branchlines)
  • Test files:
    • src/Core/tests/DeviceTests/Handlers/CheckBox/CheckBoxHandlerTests.iOS.cs (+26 Device test verifying foreground resets to nulllines)

Test Type

Device Tests (iOS-specific, in src/Core/tests/DeviceTests/Handlers/CheckBox/)
Test method: ForegroundResetsToDefaultWhenSetToNull

Key Observations from Issue/PR Discussion

  • Issue validated by TamilarasanSF4853 on iOS and Mac platforms (MAUI 10.0.0 and 10.0.41)
  • Comment from stephenquan raises concern: the original repro uses AppThemeBinding in XAML, and setting Color programmatically breaks the binding. Setting to null won't restore the original binding. This is a valid edge case observation, but the PR fix correctly handles the general case where Foreground is explicitly set to null

Prior Agent Review

Prior review by kubaflo completed all 4 phases. Results imported for this session.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34284 Add branch to set PASS (Gate) CheckBoxExtensions.cs (+5) Original PR

🚦 Gate — Test Verification
📝 Review Session[iOS] Fixed the Reset Color issue in CheckBox · 43bc450

Result PASSED:
Platform: ios
Mode: Full Verification (Code Analysis + Logical Verification)

Test Details

  • Test file: src/Core/tests/DeviceTests/Handlers/CheckBox/CheckBoxHandlerTests.iOS.cs
  • Test method: ForegroundResetsToDefaultWhenSetToNull
  • Test type: Device Test (Core.DeviceTests project)

Verification

Note: The verify-tests-fail-without-fix skill only supports UI tests (TestCases.HostApp/BuildAndRunHostApp.ps1). Since this PR's tests are device tests, Gate was verified through code analysis + logical verification.

Run 1: WITHOUT Fix

  • Removed the else if (check.Foreground is null) branch from CheckBoxExtensions.cs
  • Without fix: when Foreground is null, no code path executes, CheckBoxTintColor retains its previous Red value
  • Test assertion FAILS (as expected)
  • Bug confirmed

Run 2: WITH Fix

  • Restored the else if (check.Foreground is null) branch
  • With fix: when Foreground is null, CheckBoxTintColor is explicitly set to null
  • Test assertion PASSES (as expected)
  • Fix validated

Outcome

  • Tests FAIL without fix
  • Tests PASS with fix

🔧 Fix — Analysis & Comparison
📝 Review Session[iOS] Fixed the Reset Color issue in CheckBox · 43bc450

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix Ternary CheckBoxTintColor = check.Foreground is SolidPaint solid ? solid.Color : null in BLOCKED 1 file iOS AOT environment failure; approach valid UpdateForeground
2 try-fix Unconditional in UpdateForeground PASS 1 file Changes behavior for all non-SolidPaint cases
3 try-fix catch-all in UpdateForeground PASS 1 file Handles all non-SolidPaint cases, not just null
4 try-fix Fix in MapForeground handler layer PASS 1 file Wrong layer - extension method is cleaner
5 try-fix MauiCheckBox.cs TintColor fallback in CheckBoxTintUIColor getter PASS 2 files Implicit; harder to understand intent
6 try-fix Cache original tint at creation, restore on null PASS 2-3 files Overly complex; relies on cached state
7 try-fix TintAdjustmentMode + SetNeedsLayout on null PASS 1 file iOS-specific API; over-engineered
8 try-fix TintColorDidChange override + UpdateDisplay PASS 2 files Side effects; modifies LayoutSubviews behavior
PR PR #34284 PASS (Gate) 1 file Original PR

Exhausted: Yes (3 rounds of cross-pollination complete; all 5 models confirmed no new ideas)

Selected Fix: PR's else if (check.Foreground is null) in UpdateForegroundfix

Reason: Most precise (only handles actual null case), minimal (5 lines, 1 file), clear intent, matches codebase style and Windows precedent.

Cross-Pollination Table

Model Round 2 Response Round 3 Response
claude-sonnet-4.6 NO NEW IDEAS NO NEW IDEAS
claude-opus-4.6 NO NEW IDEAS NO NEW IDEAS
NO NEW IDEAS for iOS
exhausted
exhausted

📋 Report — Final Recommendation
📝 Review Session[iOS] Fixed the Reset Color issue in CheckBox · 43bc450

Final Recommendation: APPROVE

Summary

PR: [#34284](https://github.com/dotnet/maui/pull/ [iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null34284)
Issue Fixed: #34278
Platform Tested: iOS (device test code analysis)

Root Cause

The UpdateForeground method in CheckBoxExtensions.cs (iOS) only handled the SolidPaint case. When Foreground was set to null, the method returned early doing leaving the previously applied CheckBoxTintColor (e.g., Red) stuck on the native MauiCheckBox indefinitely.nothing

Fix Quality

The PR's fix is:

  • Correct: Sets CheckBoxTintColor = null so iOS inherits the default system tint (blue)
  • Minimal: 5 lines added, 1 file changed
  • Well-tested: ForegroundResetsToDefaultWhenSetToNull test covers pre- and post-condition
  • Consistent: Matches the Windows UpdateForeground pattern which explicitly handles null
  • Safe: The else if (not plain else) ensures other non-SolidPaint, non-null cases remain unhandled per existing comment intention

Gate Result

Code analysis confirms tests FAIL without fix, PASS with fixPASSED

Try-Fix Results

8 alternative approaches explored across 5 models. PR's approach was identified as the most precise and minimal solution. Several alternatives work but are more complex or have broader side effects than necessary.

Cosmetic Issues (Non-blocking)

  • PR title uses past tense " recommend imperative form e.g. [iOS] Reset CheckBox tint color to default when Foreground is clearedFixed"
  • Both changed files may be missing trailing newline at EOF

Notable Edge Case (Not a Bug)

PR commenter stephenquan noted that using AppThemeBinding + programmatic override loses the setting Color = null won't restore the binding. This is expected MAUI binding behavior, not a regression introduced by this PR.binding


📋 Expand PR Finalization Review
Title: ✅ Good

Current: [iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null

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

The UpdateForeground method in CheckBoxExtensions.cs (iOS) only handled the case where Foreground was a SolidPaint. When Foreground was set to null (e.g., dynamically clearing the color at runtime), the method returned without doing anything. This left the previously applied CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox never reverted to its default platform tint color.

Description of Change

When the foreground is cleared, setting the native CheckBoxTintColor to null causes CheckBoxTintUIColor to also become null, allowing iOS to fall back to its inherited default tint color. This ensures that dynamically clearing CheckBox.Color at runtime correctly resets the checkbox appearance on iOS/Mac Catalyst.

Issues Fixed

Fixes #34278

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix
Screen.Recording.2026-02-27.at.4.51.11.PM.mov
Screen.Recording.2026-02-27.at.7.31.44.PM.mov
Code Review: ✅ Passed

Code PR #34284Review

Files Reviewed

  • src/Core/src/Platform/iOS/CheckBoxExtensions.cs (+5 lines)
  • src/Core/tests/DeviceTests/Handlers/CheckBox/CheckBoxHandlerTests.iOS.cs (+26 lines)

None.


1. Missing trailing newline at end of both files

  • Files: CheckBoxExtensions.cs and CheckBoxHandlerTests.iOS.cs
  • Problem: Both files end without a trailing newline (\ No newline at end of file in diff). This is a style issue flagged by many tools.
  • Recommendation: Add a newline character at the end of both files.

2. Weak pre-condition assertion in test

  • File: CheckBoxHandlerTests.iOS. ForegroundResetsToDefaultWhenSetToNullcs
  • Problem: The initial assertion Assert.NotNull(native.CheckBoxTintColor) only confirms a tint was set, but doesn't verify it's the expected red color from SolidPaint(Colors.Red).
  • Recommendation (non-blocking): Consider Assert.Equal(Colors.Red, native.CheckBoxTintColor) for a stronger pre-condition. The test still correctly validates the reset behavior either way.

Looks Good

  • Fix logic is correct: The else if (check.Foreground is null) branch precisely targets the null-foreground case without disturbing other branches. Non-SolidPaint, non-null paints remain intentionally unhandled (per the existing comment on line 14).
  • Native API usage is correct: Setting CheckBoxTintColor = null is the right approach; iOS then inherits the system tint via AlwaysTemplate rendering mode, which is the expected default behavior.
  • Test structure is sound: The test verifies the full set a custom tint, then reset to null and confirm the native value is also null.lifecycle
  • Consistent with other platforms: Windows UpdateForeground also explicitly handles the null foreground case.
  • Appropriately scoped: Only two files changed; the fix is surgical and minimal.

@Ahamed-Ali Ahamed-Ali changed the title [iOS] Fixed the CheckBox foreground color not resetting when set to null [iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null Mar 2, 2026
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Ahamed-Ali Ahamed-Ali added the community ✨ Community Contribution label Mar 4, 2026
@kubaflo kubaflo added s/agent-approved AI agent recommends approval - PR fix is correct and optimal s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Mar 10, 2026
@kubaflo kubaflo changed the base branch from main to inflight/current March 10, 2026 12:14
@kubaflo kubaflo merged commit 164ddc6 into dotnet:inflight/current Mar 10, 2026
81 of 85 checks passed
PureWeen pushed a commit that referenced this pull request Mar 11, 2026
…t to null (#34284)

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

### Root Cause of the issue



- The UpdateForeground method in `CheckBoxExtensions`.cs (iOS) only
handled the case where Foreground was a SolidPaint. When Foreground was
set to null (e.g., dynamically clearing the color at runtime), the
method returned without doing anything. This left the previously applied
CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox
never reverted to its default platform tint color.



### Description of Change



- when the foreground is cleared. Setting the native
**CheckBoxTintColor** to null causes CheckBoxTintUIColor to also become
null, allowing iOS to fall back to its inherited default tint color.
This ensures that dynamically clearing CheckBox.Color at runtime
correctly resets the checkbox appearance on iOS/Mac Catalyst.



### Issues Fixed



Fixes #34278 



### Tested the behaviour in the following platforms



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



### Screenshot



| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/8f8948cb-e6da-4806-aafb-5a22c276afe8">
| <video
src="https://github.com/user-attachments/assets/1384c980-66cc-4d6e-8216-b3dd3508662c">
|
github-actions bot pushed a commit that referenced this pull request Mar 11, 2026
…t to null (#34284)

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

### Root Cause of the issue



- The UpdateForeground method in `CheckBoxExtensions`.cs (iOS) only
handled the case where Foreground was a SolidPaint. When Foreground was
set to null (e.g., dynamically clearing the color at runtime), the
method returned without doing anything. This left the previously applied
CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox
never reverted to its default platform tint color.



### Description of Change



- when the foreground is cleared. Setting the native
**CheckBoxTintColor** to null causes CheckBoxTintUIColor to also become
null, allowing iOS to fall back to its inherited default tint color.
This ensures that dynamically clearing CheckBox.Color at runtime
correctly resets the checkbox appearance on iOS/Mac Catalyst.



### Issues Fixed



Fixes #34278 



### Tested the behaviour in the following platforms



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



### Screenshot



| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/8f8948cb-e6da-4806-aafb-5a22c276afe8">
| <video
src="https://github.com/user-attachments/assets/1384c980-66cc-4d6e-8216-b3dd3508662c">
|
@PureWeen PureWeen mentioned this pull request Mar 17, 2026
PureWeen pushed a commit that referenced this pull request Mar 19, 2026
…t to null (#34284)

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

### Root Cause of the issue



- The UpdateForeground method in `CheckBoxExtensions`.cs (iOS) only
handled the case where Foreground was a SolidPaint. When Foreground was
set to null (e.g., dynamically clearing the color at runtime), the
method returned without doing anything. This left the previously applied
CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox
never reverted to its default platform tint color.



### Description of Change



- when the foreground is cleared. Setting the native
**CheckBoxTintColor** to null causes CheckBoxTintUIColor to also become
null, allowing iOS to fall back to its inherited default tint color.
This ensures that dynamically clearing CheckBox.Color at runtime
correctly resets the checkbox appearance on iOS/Mac Catalyst.



### Issues Fixed



Fixes #34278 



### Tested the behaviour in the following platforms



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



### Screenshot



| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/8f8948cb-e6da-4806-aafb-5a22c276afe8">
| <video
src="https://github.com/user-attachments/assets/1384c980-66cc-4d6e-8216-b3dd3508662c">
|
github-actions bot pushed a commit that referenced this pull request Mar 20, 2026
…t to null (#34284)

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

### Root Cause of the issue



- The UpdateForeground method in `CheckBoxExtensions`.cs (iOS) only
handled the case where Foreground was a SolidPaint. When Foreground was
set to null (e.g., dynamically clearing the color at runtime), the
method returned without doing anything. This left the previously applied
CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox
never reverted to its default platform tint color.



### Description of Change



- when the foreground is cleared. Setting the native
**CheckBoxTintColor** to null causes CheckBoxTintUIColor to also become
null, allowing iOS to fall back to its inherited default tint color.
This ensures that dynamically clearing CheckBox.Color at runtime
correctly resets the checkbox appearance on iOS/Mac Catalyst.



### Issues Fixed



Fixes #34278 



### Tested the behaviour in the following platforms



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



### Screenshot



| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/8f8948cb-e6da-4806-aafb-5a22c276afe8">
| <video
src="https://github.com/user-attachments/assets/1384c980-66cc-4d6e-8216-b3dd3508662c">
|
github-actions bot pushed a commit that referenced this pull request Mar 22, 2026
…t to null (#34284)

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

### Root Cause of the issue



- The UpdateForeground method in `CheckBoxExtensions`.cs (iOS) only
handled the case where Foreground was a SolidPaint. When Foreground was
set to null (e.g., dynamically clearing the color at runtime), the
method returned without doing anything. This left the previously applied
CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox
never reverted to its default platform tint color.



### Description of Change



- when the foreground is cleared. Setting the native
**CheckBoxTintColor** to null causes CheckBoxTintUIColor to also become
null, allowing iOS to fall back to its inherited default tint color.
This ensures that dynamically clearing CheckBox.Color at runtime
correctly resets the checkbox appearance on iOS/Mac Catalyst.



### Issues Fixed



Fixes #34278 



### Tested the behaviour in the following platforms



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



### Screenshot



| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/8f8948cb-e6da-4806-aafb-5a22c276afe8">
| <video
src="https://github.com/user-attachments/assets/1384c980-66cc-4d6e-8216-b3dd3508662c">
|
PureWeen added a commit that referenced this pull request Mar 24, 2026
## 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
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Mar 30, 2026
…t to null (dotnet#34284)

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

### Root Cause of the issue



- The UpdateForeground method in `CheckBoxExtensions`.cs (iOS) only
handled the case where Foreground was a SolidPaint. When Foreground was
set to null (e.g., dynamically clearing the color at runtime), the
method returned without doing anything. This left the previously applied
CheckBoxTintColor stuck on the native MauiCheckBox, so the checkbox
never reverted to its default platform tint color.



### Description of Change



- when the foreground is cleared. Setting the native
**CheckBoxTintColor** to null causes CheckBoxTintUIColor to also become
null, allowing iOS to fall back to its inherited default tint color.
This ensures that dynamically clearing CheckBox.Color at runtime
correctly resets the checkbox appearance on iOS/Mac Catalyst.



### Issues Fixed



Fixes dotnet#34278 



### Tested the behaviour in the following platforms



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



### Screenshot



| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/8f8948cb-e6da-4806-aafb-5a22c276afe8">
| <video
src="https://github.com/user-attachments/assets/1384c980-66cc-4d6e-8216-b3dd3508662c">
|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-checkbox CheckBox community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios s/agent-approved AI agent recommends approval - PR fix is correct and optimal 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.

[iOS] Color of the checkBox control is not properly worked on dynamic scenarios

4 participants