[iOS, Mac] Fix for RadioButton TextColor for plain Content not working#31940
[iOS, Mac] Fix for RadioButton TextColor for plain Content not working#31940kubaflo merged 12 commits intodotnet:inflight/currentfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where RadioButton TextColor property was not working on iOS/Mac when global Label styles were present in the application. The problem occurred because RadioButtons use ContentPresenter to display string content, which converts the string to a Label that inherits global Label styles, overriding the intended TextColor.
- Created a new
ContentLabelsubclass ofLabelto bypass global Label styles - Updated the
ConvertToLabelmethod to useContentLabelinstead ofLabel - Added explanatory comments for the workaround approach
4f6ed55 to
c562641
Compare
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Add baseimages ·
|
| File:Line | Reviewer Says | Author Says | Status |
|---|---|---|---|
| ContentConverter.cs | "Can include a comment here?" | Comment added | ✅ RESOLVED |
| ContentConverter.cs:47 | "Can you include related tests?" | Tests added (took multiple attempts) | ✅ RESOLVED |
| ContentConverter.cs | ContentLabel should be internal |
Addressed | ✅ RESOLVED |
| ContentConverter.cs | Won't fix with ApplyToDerivedTypes="True" |
Self-hosted style addresses this | ✅ RESOLVED |
| ContentConverter.cs | Can you add tests? (kubaflo) | Tests added | ✅ RESOLVED |
Prior Agent Review History
Three prior agent reviews were conducted. The most recent (rmarinho's comment):
- Pre-Flight: ✅ COMPLETE
- Gate: ✅ PASSED (iOS, full verification)
- Fix: ✅ COMPLETE (8 try-fix alternatives; PR's fix selected as best)
- Report: ✅ APPROVE
New since last review: Commit 95167d93 ("Add baseimages") added ios and ios-26 snapshot PNG files that were missing. Prior review ran Gate and test created local baselines — this commit persists them to the repo.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #31940 | ContentLabel : Label internal subclass with self-hosted empty Style(typeof(ContentLabel)) |
⏳ PENDING (Gate) | ContentConverter.cs (+15, -3) |
Prior review validated; all concerns resolved |
🚦 Gate — Test Verification
📝 Review Session — Add baseimages · 95167d9
Result: ✅ PASSED
Platform: ios
Mode: Full Verification (RequireFullVerification: true)
- Tests FAIL without fix ✅ (bug correctly detected when
ContentConverter.csreverted) - Tests PASS with fix ✅ (fix resolves the issue)
Test: RadioButtonTextColorShouldNotBeOverriddenByGlobalLabelStyle
Device: iOS Simulator (01E8CA9E-1D30-4467-B4F6-DEB4890B9A27)
Test File: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18011.cs
The tests correctly catch the bug and validate the fix.
🔧 Fix — Analysis & Comparison
📝 Review Session — Add baseimages · 95167d9
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (claude-sonnet-4.6) | Instance-level empty Style(typeof(Label)) in label's own Resources dictionary (no subclass needed) |
✅ PASS | ContentConverter.cs |
Works but mutates a plain Label instance; same style-shadowing concept as PR but without subclass |
| 2 | try-fix (claude-opus-4.6) | Override OnSetDynamicResource in ContentLabel subclass to skip Label implicit style key |
✅ PASS | ContentConverter.cs |
Works but intercepts a deeper internal API; risks breaking other dynamic resource usage |
| 3 | try-fix (gpt-5.2) | Set label.Style = new Style(typeof(Label)) (explicit Style property) |
❌ FAIL (3% visual diff) | ContentConverter.cs |
Explicit Style assignment does not block implicit style application |
| 4 | try-fix (gpt-5.3-codex) | Force bindings by adding forceBindings parameter to ShouldSetBinding |
❌ FAIL (env/compile error) | ContentConverter.cs |
Modifies shared binding logic; would have side effects; env error prevented full test |
| 5 | try-fix (gemini-3-pro-preview) | Simple ContentLabel : Label subclass with NO self-hosted style |
✅ PASS | ContentConverter.cs |
Incomplete PR fix: bypasses standard Label styles but does NOT handle ApplyToDerivedTypes="True" case |
| PR | PR #31940 | ContentLabel : Label internal subclass WITH self-hosted empty Style(typeof(ContentLabel)) in Resources |
✅ PASS (Gate) | ContentConverter.cs (+15, -3) |
Handles both standard and ApplyToDerivedTypes="True" cases; type isolation + style shadowing |
Cross-Pollination Round 2
| Model | Response |
|---|---|
| claude-sonnet-4.6 | NO NEW IDEAS |
| claude-opus-4.6 | NO NEW IDEAS - all approaches covered: resource blocking, style interception, binding override, type mismatch |
| gpt-5.2 | NEW IDEA: Scoped TemplateBinding in RadioButton template to set TextColor, overriding global Label style (would require RadioButton template changes - out of scope) |
| gpt-5.3-codex | NEW IDEA: Re-apply TextColor in Loaded/HandlerChanged (deferred binding — already tried in prior review session, has timing dependency) |
| gemini-3-pro-preview | NEW IDEA: Set TextColor as local value directly (similar to Attempt 3 which failed - explicit Style doesn't block implicit styles) |
Exhausted: Yes (3/5 models gave "new" ideas that are either already explored in prior session or out of scope; 2/5 confirmed no new ideas)
Selected Fix: PR's fix — The ContentLabel subclass with self-hosted Style(typeof(ContentLabel)) in Resources is superior to all alternatives:
- Beats Attempt 1 (instance-level Label Resources): PR uses a distinct type so no change to
Labelsemantics; static style is shared across instances (less allocation) - Beats Attempt 2 (OnSetDynamicResource override): PR doesn't intercept internal API; lower risk of unexpected behavior
- Beats Attempt 5 (simple subclass): PR handles
ApplyToDerivedTypes="True"case via self-hosted style; Attempt 5 leaves this edge case open - Deferred binding (prior session): PR has no timing dependency
Root Cause Analysis
ContentConverter.ConvertToLabel()creates anew LabelwhenRadioButton.Contentis a plain string- MAUI's
MergedStyle.RegisterImplicitStyles()callsSetDynamicResource("Microsoft.Maui.Controls.Label")on all Label instances in the tree - When global
<Style TargetType="Label">exists withTextColor = Colors.Green, this overrides the RadioButton'sTextColor = Colors.Redbinding ShouldSetBindingchecksIsSetBEFORE the label enters the visual tree (before styles resolve), soTextColoris "not set" at that point and binding is registered- But when the label resolves styles (after entering the tree), the implicit style writes
TextColoratStylespecificity, which can conflict with theFindAncestorbinding - The fix creates
ContentLabel— a distinct type that implicit Label styles don't target by default, and with a self-hostedStyle(typeof(ContentLabel))that blocksApplyToDerivedTypes="True"scenarios via local resource priority
📋 Report — Final Recommendation
📝 Review Session — Add baseimages · 95167d9
✅ Final Recommendation: APPROVE
Summary
PR #31940 correctly fixes RadioButton TextColor being ignored on iOS/MacCatalyst when global Label styles are present in the application. Gate verified the fix on iOS (tests FAIL without fix, PASS with fix). The try-fix phase explored 5 independent alternatives — all 3 that passed are variations of the same style-blocking concept but less robust than the PR's approach. The PR's fix is the best solution.
Root Cause
When RadioButton.Content is a plain string, ContentConverter.ConvertToLabel() creates a new Label. MAUI's style system (MergedStyle.RegisterImplicitStyles) applies <Style TargetType="Label"> implicit styles to ALL Label instances, including this internally-created one. Because the RadioButton's TextColor binding is registered before the label enters the visual tree (and thus before styles resolve), ShouldSetBinding allows the binding — but when styles apply after tree entry, they can override the binding's value. When ApplyToDerivedTypes="True" is also set, the style applies to all Label subclasses as well.
Fix Quality
The ContentLabel : Label internal subclass with a self-hosted Style(typeof(ContentLabel)) in Resources is the most robust solution among all alternatives explored:
| Approach | Result | Robustness |
|---|---|---|
| PR: ContentLabel + self-hosted Style(ContentLabel) | ✅ PASS | ⭐⭐⭐ Handles both standard and ApplyToDerivedTypes |
| Attempt 1: Instance-level Style(Label) in Resources | ✅ PASS | ⭐⭐ Works but mutates plain Label; shared key could have implications |
| Attempt 2: Override OnSetDynamicResource | ✅ PASS | ⭐⭐ Intercepts internal API; less visible mechanism |
| Attempt 3: Explicit label.Style = empty Style | ❌ FAIL | — Doesn't block implicit styles |
| Attempt 4: Force bindings via ShouldSetBinding | ❌ FAIL | — Modifies shared binding logic |
| Attempt 5: Simple ContentLabel subclass only | ✅ PASS | ⭐ Doesn't handle ApplyToDerivedTypes="True" case |
Why PR's fix is best:
- Type-level isolation prevents styles from targeting
ContentLabelby default - Self-hosted
Style(typeof(ContentLabel))handles theApplyToDerivedTypes="True"edge case via local resource priority - No timing dependency (unlike deferred/Loaded event approaches from prior review session)
- No modification to shared binding logic (unlike force-binding approaches)
static readonly Style s_styleis shared across instances (no per-instance overhead)
Code Review Findings
🟡 Minor: PlatformAffected.iOS should include MacCatalyst
- File:
src/Controls/tests/TestCases.HostApp/Issues/Issue18011.cs:3 - Issue:
PlatformAffected.iOSbut the fix is in cross-platformContentConverter.csand PR title says[iOS, Mac] - Suggestion: Change to
PlatformAffected.iOS | PlatformAffected.MacCatalyst - Severity: Minor — tests still run correctly, just misrepresents the affected scope
🟡 Minor: Truncated PR description
- The last sentence of the PR body is cut off at "With this update, the label bypasses"
- Should be completed to describe what the label bypasses (global Label styles)
✅ Everything Else Looks Good:
ContentLabelis correctlyinternal(not public)- Self-hosted style mechanism works correctly for both standard and
ApplyToDerivedTypesscenarios - Test page properly adds and removes global Label styles (good test isolation)
- Two RadioButton test cases (one with explicit red color, one default) cover the key regression scenario
- Comments explain the approach clearly
- iOS snapshot baselines provided for both
iosandios-26environments - All platform snapshots committed (Android, Mac, Windows, iOS, iOS-26)
What NOT to Do (for future agents)
- ❌ Don't set
label.Style = new Style(typeof(Label))— Explicit Style assignment does NOT block implicit style application; MAUI applies implicit styles through a separate mechanism - ❌ Don't use simple
ContentLabel : Labelsubclass without self-hosted style — Works for standard Label styles but breaks whenApplyToDerivedTypes="True"is set - ❌ Don't use deferred binding (Loaded event + force re-apply) — Works but adds timing dependency and event subscription overhead; type isolation is cleaner
PR Title & Description
Title: [iOS, Mac] Fix for RadioButton TextColor for plain Content not working
Assessment: Acceptable, though [iOS, Mac] RadioButton: Fix TextColor ignored when global Label styles present is more searchable.
Description: Has the required NOTE block already present. Truncated last sentence should be completed.
📋 Expand PR Finalization Review
Title: ✅ Good
Current: [iOS, Mac] Fix for RadioButton TextColor for plain Content not working
Description: ⚠️ Needs Update
[iOS, Mac]prefix is inaccurate — the fix is inContentConverter.csinsrc/Controls/src/Core/, which is cross-platform Core code, not iOS/Mac-specific. Snapshot images were also added for Android and Windows, confirming the fix is cross-platform.- "Fix for" is redundant phrasing.
- "not working" is vague — doesn't describe the actual mechanism or root cause.
✨ 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
When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set.
The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored.
Description of Change
Introduced a new internal ContentLabel class (a subclass of Label) and changed ContentConverter.ConvertToLabel to instantiate ContentLabel instead of Label.
ContentLabel adds a self-hosted empty implicit style for its own type to its Resources:
internal class ContentLabel : Label
{
static readonly Style s_style = new Style(typeof(ContentLabel));
public ContentLabel()
{
Resources = new ResourceDictionary { { typeof(ContentLabel).FullName, s_style } };
}
}MAUI's style resolution searches the element's own ResourceDictionary before traversing up to parent/application resources. When an implicit style for ContentLabel is found in the element's own resources, the lookup stops — the global Label style (with ApplyToDerivedTypes = true) is never applied to the ContentLabel. This leaves TextColor unset by any style, so ShouldSetBinding correctly allows the binding to the RadioButton's TextColor to be established.
The fix is cross-platform — ContentConverter.cs lives in Core and is shared across iOS, Mac Catalyst, Android, and Windows. Snapshots were added for all four platforms.
Key Technical Details
Why typeof(ContentLabel).FullName as the ResourceDictionary key works:
MAUI's implicit style resolution looks for Style objects stored in ResourceDictionary using the target type's full name (e.g., "Microsoft.Maui.Controls.ContentLabel") as the string key. This is the standard mechanism for implicit styles.
Why the static Style field is safe:
s_style has no setters and is only used to block other styles from being applied. It is effectively a sentinel value and is safe to share across all ContentLabel instances.
Scope of change:
ContentLabel is internal, so it is not exposed as a public API. Any consumer using ContentPresenter with string content (e.g., RadioButton, Button, CheckBox) benefits from this fix without API surface changes.
Issues Fixed
Fixes #18011
Platforms Tested
- iOS
- Mac Catalyst
- Android
- Windows
Code Review: ⚠️ Issues Found
Code Review — PR #31940
🔴 Critical Issues
Description Truncated Mid-Sentence
File: PR body (not code)
Problem: The PR description ends abruptly:
"With this update, the label bypasses "
This is a copy-paste or editing accident. The description is incomplete and fails to communicate the complete fix rationale to reviewers and future agents.
Recommendation: Complete the description (see recommended-description.md).
🟡 Suggestions
1. PlatformAffected.iOS Should Be PlatformAffected.All
File: src/Controls/tests/TestCases.HostApp/Issues/Issue18011.cs:3
[Issue(IssueTracker.Github, 18011,
"RadioButton TextColor for plain Content not working on iOS when Label styles present", PlatformAffected.iOS)]Problem: The fix is in ContentConverter.cs which is Core/cross-platform code. Snapshot images were added for Android, iOS, Mac, and Windows — confirming all platforms are affected and the fix applies everywhere. Using PlatformAffected.iOS incorrectly scopes the test to iOS only.
Recommendation: Change to PlatformAffected.All.
2. ContentLabel Mechanism Could Benefit From a More Explicit Explanation
File: src/Controls/src/Core/ContentConverter.cs:134-143
// Internal label type used by ContentPresenter to avoid interference from global Label styles.
// A self-hosted empty style blocks inherited Label styles (including ApplyToDerivedTypes) from being applied.
internal class ContentLabel : Label
{
static readonly Style s_style = new Style(typeof(ContentLabel));
public ContentLabel()
{
Resources = new ResourceDictionary { { typeof(ContentLabel).FullName, s_style } };
}
}Problem: The comment explains what happens but not why it works at the framework level. The key mechanism is:
- MAUI's implicit style resolution checks the element's own
Resourcesbefore traversing parent/application resources. - Storing a
Stylewith keytypeof(ContentLabel).FullNameregisters it as an implicit style forContentLabel. - When this style is found locally, the lookup stops — the global
Labelstyle withApplyToDerivedTypes = trueis never reached.
This makes ShouldSetBinding return true for TextColorProperty, allowing the binding to the RadioButton's TextColor to be established.
Recommendation: Add a brief comment mentioning that the string key is the implicit style registration mechanism (FullName = implicit style key) and that finding it locally short-circuits the lookup up the resource tree.
3. Test Only Verifies Visual Appearance, Not Color Value
File: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18011.cs
[Test]
[Category(UITestCategories.RadioButton)]
public void RadioButtonTextColorShouldNotBeOverriddenByGlobalLabelStyle()
{
App.WaitForElement("RadioButtonWithTextColor");
VerifyScreenshot();
}Problem: The test verifies the visual appearance via screenshot comparison only. If the color rendering changes slightly across OS versions or hardware, the snapshot may need updating even if the fix is still working correctly.
Recommendation: While screenshot tests are acceptable, note that VerifyScreenshot() with no tolerance parameters may be fragile across iOS versions (e.g., ios vs ios-26 snapshots are separate). The test does have both ios and ios-26 snapshots added, which is good practice.
This is a minor observation — the overall test structure is correct.
✅ Looks Good
ContentLabelasinternal— Correctly scoped. Not exposed as a public API surface, so noPublicAPI.Unshipped.txtchanges needed.- Static
s_stylefield — Correct. The style has no setters and is purely structural. Sharing it across instances is safe and efficient. OnDisappearingcleanup in HostApp — The test page correctly removes the injected global style on disappear, preventing it from affecting subsequent tests.- NOTE block present — The PR description includes the required NOTE block for community testers.
- Snapshots added for all 4 platforms — Android, iOS, iOS-26, Mac, Windows snapshots are all included.
ShouldSetBindinginteraction — The fix correctly addresses the root cause: by preventing the global style from settingTextColor,ShouldSetBindingreturnstrueand the binding to the RadioButton'sTextColoris established correctly.- No breaking API changes —
ContentLabelisinternal,ConvertToLabelisprivate static. No public API surface is changed.
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 31940Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 31940" |
@kubaflo, Added test case. |
Addressed the valid concerns. |
…#34317) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description of Change Add `darc-*` to the `trigger: branches: include:` section in `ci-uitests.yml` and `ci-device-tests.yml` so that `maui-pr-uitests` and `maui-pr-devicetests` automatically run when dotnet-maestro pushes dependency updates to `darc-*` branches. Previously, these pipelines required manual `/azp run` comments on every maestro PR. ### Issues Fixed N/A - CI improvement ### Files Changed - `eng/pipelines/ci-uitests.yml` - Added `darc-*` to CI trigger branch filter - `eng/pipelines/ci-device-tests.yml` - Added `darc-*` to CI trigger branch filter Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4196486 to
11b947a
Compare
#31940) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details - RadioButton TextColor not working on iOS when Label styles are present in Styles.xaml ### Root Cause of the issue - When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set. - The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored. ### Description of Change ### Bug fix: Prevent global Label styles from interfering with RadioButton text color * Introduced a new internal `ContentLabel` class in `ContentConverter.cs` that uses a self-hosted empty style to block inherited global `Label` styles, ensuring that `RadioButton` text color is not overridden. * Updated the `ConvertToLabel` method in `ContentConverter.cs` to use `ContentLabel` instead of `Label` for plain text content, preventing interference from global styles. ### Testing and verification * Added a UI test in `TestCases.Shared.Tests/Tests/Issues/Issue18011.cs` to verify that the `RadioButton` text color is not overridden by global `Label` styles. * Added a sample test case in `TestCases.HostApp/Issues/Issue18011.cs` that sets a global `Label` style and demonstrates the issue, confirming the fix and cleaning up styles after the test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #18011 ### Tested the behaviour in the following platforms - [x] - Windows - [x] - Android - [x] - iOS - [x] - Mac ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/f1921f05-b01c-402b-8661-22e455d264e4"/> | <img src="https://github.com/user-attachments/assets/172259a4-9957-481c-92cb-0c791ebcde41"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#31940) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details - RadioButton TextColor not working on iOS when Label styles are present in Styles.xaml ### Root Cause of the issue - When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set. - The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored. ### Description of Change ### Bug fix: Prevent global Label styles from interfering with RadioButton text color * Introduced a new internal `ContentLabel` class in `ContentConverter.cs` that uses a self-hosted empty style to block inherited global `Label` styles, ensuring that `RadioButton` text color is not overridden. * Updated the `ConvertToLabel` method in `ContentConverter.cs` to use `ContentLabel` instead of `Label` for plain text content, preventing interference from global styles. ### Testing and verification * Added a UI test in `TestCases.Shared.Tests/Tests/Issues/Issue18011.cs` to verify that the `RadioButton` text color is not overridden by global `Label` styles. * Added a sample test case in `TestCases.HostApp/Issues/Issue18011.cs` that sets a global `Label` style and demonstrates the issue, confirming the fix and cleaning up styles after the test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #18011 ### Tested the behaviour in the following platforms - [x] - Windows - [x] - Android - [x] - iOS - [x] - Mac ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/f1921f05-b01c-402b-8661-22e455d264e4"/> | <img src="https://github.com/user-attachments/assets/172259a4-9957-481c-92cb-0c791ebcde41"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nal source generators (#34514) <!-- 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 : - [PR #31940 ](#31940) added `ContentLabel` as a top-level internal class in Microsoft.Maui.Controls. It inherits from `Label`, so it implements ITextStyle and IAnimatable. - Source generators scan all namespace-level types in the assembly. Because `ContentLabel` is namespace-level, it was picked up and code was generated referencing it. - Since the class is internal, the generated code cannot access it from another assembly, causing a compile-time accessibility error. ### Description of Change : - `ContentLabel` was moved from a top-level internal class in `Microsoft.Maui.Controls` to a nested class inside `ContentConverter`. - Top-level internal classes are returned by namespace-level scans, but nested classes without an explicit modifier are private by default. - Source generators scanning top-level types no longer see `ContentLabel`, so no code is generated referencing it. - Functionally, nothing changed: `ContentLabel` is still used only inside `ContentConverter`, and style mechanisms continue to work correctly. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #34512 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac ### ScreenShots | Before Issue Fix | After Issue Fix | |----------|----------| | <img width="1158" height="276" alt="Screenshot 2026-03-17 at 19 42 54" src="https://github.com/user-attachments/assets/3021227c-b516-4403-98f3-569ec4266ee0" />| <img width="1073" height="833" alt="Screenshot 2026-03-17 at 19 37 06" src="https://github.com/user-attachments/assets/24dbc6ce-86b4-4748-9184-37a01f65005a" /> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
#31940) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details - RadioButton TextColor not working on iOS when Label styles are present in Styles.xaml ### Root Cause of the issue - When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set. - The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored. ### Description of Change ### Bug fix: Prevent global Label styles from interfering with RadioButton text color * Introduced a new internal `ContentLabel` class in `ContentConverter.cs` that uses a self-hosted empty style to block inherited global `Label` styles, ensuring that `RadioButton` text color is not overridden. * Updated the `ConvertToLabel` method in `ContentConverter.cs` to use `ContentLabel` instead of `Label` for plain text content, preventing interference from global styles. ### Testing and verification * Added a UI test in `TestCases.Shared.Tests/Tests/Issues/Issue18011.cs` to verify that the `RadioButton` text color is not overridden by global `Label` styles. * Added a sample test case in `TestCases.HostApp/Issues/Issue18011.cs` that sets a global `Label` style and demonstrates the issue, confirming the fix and cleaning up styles after the test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #18011 ### Tested the behaviour in the following platforms - [x] - Windows - [x] - Android - [x] - iOS - [x] - Mac ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/f1921f05-b01c-402b-8661-22e455d264e4"/> | <img src="https://github.com/user-attachments/assets/172259a4-9957-481c-92cb-0c791ebcde41"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#31940) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details - RadioButton TextColor not working on iOS when Label styles are present in Styles.xaml ### Root Cause of the issue - When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set. - The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored. ### Description of Change ### Bug fix: Prevent global Label styles from interfering with RadioButton text color * Introduced a new internal `ContentLabel` class in `ContentConverter.cs` that uses a self-hosted empty style to block inherited global `Label` styles, ensuring that `RadioButton` text color is not overridden. * Updated the `ConvertToLabel` method in `ContentConverter.cs` to use `ContentLabel` instead of `Label` for plain text content, preventing interference from global styles. ### Testing and verification * Added a UI test in `TestCases.Shared.Tests/Tests/Issues/Issue18011.cs` to verify that the `RadioButton` text color is not overridden by global `Label` styles. * Added a sample test case in `TestCases.HostApp/Issues/Issue18011.cs` that sets a global `Label` style and demonstrates the issue, confirming the fix and cleaning up styles after the test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #18011 ### Tested the behaviour in the following platforms - [x] - Windows - [x] - Android - [x] - iOS - [x] - Mac ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/f1921f05-b01c-402b-8661-22e455d264e4"/> | <img src="https://github.com/user-attachments/assets/172259a4-9957-481c-92cb-0c791ebcde41"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nal source generators (#34514) <!-- 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 : - [PR #31940 ](#31940) added `ContentLabel` as a top-level internal class in Microsoft.Maui.Controls. It inherits from `Label`, so it implements ITextStyle and IAnimatable. - Source generators scan all namespace-level types in the assembly. Because `ContentLabel` is namespace-level, it was picked up and code was generated referencing it. - Since the class is internal, the generated code cannot access it from another assembly, causing a compile-time accessibility error. ### Description of Change : - `ContentLabel` was moved from a top-level internal class in `Microsoft.Maui.Controls` to a nested class inside `ContentConverter`. - Top-level internal classes are returned by namespace-level scans, but nested classes without an explicit modifier are private by default. - Source generators scanning top-level types no longer see `ContentLabel`, so no code is generated referencing it. - Functionally, nothing changed: `ContentLabel` is still used only inside `ContentConverter`, and style mechanisms continue to work correctly. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #34512 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac ### ScreenShots | Before Issue Fix | After Issue Fix | |----------|----------| | <img width="1158" height="276" alt="Screenshot 2026-03-17 at 19 42 54" src="https://github.com/user-attachments/assets/3021227c-b516-4403-98f3-569ec4266ee0" />| <img width="1073" height="833" alt="Screenshot 2026-03-17 at 19 37 06" src="https://github.com/user-attachments/assets/24dbc6ce-86b4-4748-9184-37a01f65005a" /> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
#31940) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details - RadioButton TextColor not working on iOS when Label styles are present in Styles.xaml ### Root Cause of the issue - When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set. - The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored. ### Description of Change ### Bug fix: Prevent global Label styles from interfering with RadioButton text color * Introduced a new internal `ContentLabel` class in `ContentConverter.cs` that uses a self-hosted empty style to block inherited global `Label` styles, ensuring that `RadioButton` text color is not overridden. * Updated the `ConvertToLabel` method in `ContentConverter.cs` to use `ContentLabel` instead of `Label` for plain text content, preventing interference from global styles. ### Testing and verification * Added a UI test in `TestCases.Shared.Tests/Tests/Issues/Issue18011.cs` to verify that the `RadioButton` text color is not overridden by global `Label` styles. * Added a sample test case in `TestCases.HostApp/Issues/Issue18011.cs` that sets a global `Label` style and demonstrates the issue, confirming the fix and cleaning up styles after the test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #18011 ### Tested the behaviour in the following platforms - [x] - Windows - [x] - Android - [x] - iOS - [x] - Mac ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/f1921f05-b01c-402b-8661-22e455d264e4"/> | <img src="https://github.com/user-attachments/assets/172259a4-9957-481c-92cb-0c791ebcde41"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nal source generators (#34514) <!-- 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 : - [PR #31940 ](#31940) added `ContentLabel` as a top-level internal class in Microsoft.Maui.Controls. It inherits from `Label`, so it implements ITextStyle and IAnimatable. - Source generators scan all namespace-level types in the assembly. Because `ContentLabel` is namespace-level, it was picked up and code was generated referencing it. - Since the class is internal, the generated code cannot access it from another assembly, causing a compile-time accessibility error. ### Description of Change : - `ContentLabel` was moved from a top-level internal class in `Microsoft.Maui.Controls` to a nested class inside `ContentConverter`. - Top-level internal classes are returned by namespace-level scans, but nested classes without an explicit modifier are private by default. - Source generators scanning top-level types no longer see `ContentLabel`, so no code is generated referencing it. - Functionally, nothing changed: `ContentLabel` is still used only inside `ContentConverter`, and style mechanisms continue to work correctly. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #34512 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac ### ScreenShots | Before Issue Fix | After Issue Fix | |----------|----------| | <img width="1158" height="276" alt="Screenshot 2026-03-17 at 19 42 54" src="https://github.com/user-attachments/assets/3021227c-b516-4403-98f3-569ec4266ee0" />| <img width="1073" height="833" alt="Screenshot 2026-03-17 at 19 37 06" src="https://github.com/user-attachments/assets/24dbc6ce-86b4-4748-9184-37a01f65005a" /> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
…nal source generators (dotnet#34514) <!-- 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 : - [PR dotnet#31940 ](dotnet#31940) added `ContentLabel` as a top-level internal class in Microsoft.Maui.Controls. It inherits from `Label`, so it implements ITextStyle and IAnimatable. - Source generators scan all namespace-level types in the assembly. Because `ContentLabel` is namespace-level, it was picked up and code was generated referencing it. - Since the class is internal, the generated code cannot access it from another assembly, causing a compile-time accessibility error. ### Description of Change : - `ContentLabel` was moved from a top-level internal class in `Microsoft.Maui.Controls` to a nested class inside `ContentConverter`. - Top-level internal classes are returned by namespace-level scans, but nested classes without an explicit modifier are private by default. - Source generators scanning top-level types no longer see `ContentLabel`, so no code is generated referencing it. - Functionally, nothing changed: `ContentLabel` is still used only inside `ContentConverter`, and style mechanisms continue to work correctly. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes dotnet#34512 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac ### ScreenShots | Before Issue Fix | After Issue Fix | |----------|----------| | <img width="1158" height="276" alt="Screenshot 2026-03-17 at 19 42 54" src="https://github.com/user-attachments/assets/3021227c-b516-4403-98f3-569ec4266ee0" />| <img width="1073" height="833" alt="Screenshot 2026-03-17 at 19 37 06" src="https://github.com/user-attachments/assets/24dbc6ce-86b4-4748-9184-37a01f65005a" /> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
…nal source generators (dotnet#34514) <!-- 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 : - [PR dotnet#31940 ](dotnet#31940) added `ContentLabel` as a top-level internal class in Microsoft.Maui.Controls. It inherits from `Label`, so it implements ITextStyle and IAnimatable. - Source generators scan all namespace-level types in the assembly. Because `ContentLabel` is namespace-level, it was picked up and code was generated referencing it. - Since the class is internal, the generated code cannot access it from another assembly, causing a compile-time accessibility error. ### Description of Change : - `ContentLabel` was moved from a top-level internal class in `Microsoft.Maui.Controls` to a nested class inside `ContentConverter`. - Top-level internal classes are returned by namespace-level scans, but nested classes without an explicit modifier are private by default. - Source generators scanning top-level types no longer see `ContentLabel`, so no code is generated referencing it. - Functionally, nothing changed: `ContentLabel` is still used only inside `ContentConverter`, and style mechanisms continue to work correctly. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes dotnet#34512 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac ### ScreenShots | Before Issue Fix | After Issue Fix | |----------|----------| | <img width="1158" height="276" alt="Screenshot 2026-03-17 at 19 42 54" src="https://github.com/user-attachments/assets/3021227c-b516-4403-98f3-569ec4266ee0" />| <img width="1073" height="833" alt="Screenshot 2026-03-17 at 19 37 06" src="https://github.com/user-attachments/assets/24dbc6ce-86b4-4748-9184-37a01f65005a" /> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
## 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
dotnet#31940) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details - RadioButton TextColor not working on iOS when Label styles are present in Styles.xaml ### Root Cause of the issue - When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set. - The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored. ### Description of Change ### Bug fix: Prevent global Label styles from interfering with RadioButton text color * Introduced a new internal `ContentLabel` class in `ContentConverter.cs` that uses a self-hosted empty style to block inherited global `Label` styles, ensuring that `RadioButton` text color is not overridden. * Updated the `ConvertToLabel` method in `ContentConverter.cs` to use `ContentLabel` instead of `Label` for plain text content, preventing interference from global styles. ### Testing and verification * Added a UI test in `TestCases.Shared.Tests/Tests/Issues/Issue18011.cs` to verify that the `RadioButton` text color is not overridden by global `Label` styles. * Added a sample test case in `TestCases.HostApp/Issues/Issue18011.cs` that sets a global `Label` style and demonstrates the issue, confirming the fix and cleaning up styles after the test. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes dotnet#18011 ### Tested the behaviour in the following platforms - [x] - Windows - [x] - Android - [x] - iOS - [x] - Mac ### Output | Before | After | |----------|----------| | <img src="https://github.com/user-attachments/assets/f1921f05-b01c-402b-8661-22e455d264e4"/> | <img src="https://github.com/user-attachments/assets/172259a4-9957-481c-92cb-0c791ebcde41"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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!
Issue Details
Root Cause of the issue
When a RadioButton has plain string content (e.g., Content = "some text"), ContentConverter.ConvertToLabel creates a Label to display it and then binds the RadioButton's TextColor to the label via BindTextProperties. The binding is only applied if ShouldSetBinding confirms the property is not already set.
The bug: if the application has a global implicit Label style (e.g., in App.xaml) that sets TextColor, and that style has ApplyToDerivedTypes = true (the default for implicit styles), MAUI applies it to the newly-created Label before the binding is set up. When ShouldSetBinding then checks IsSet(TextColorProperty), it finds the style has already set the property and skips setting the binding — leaving the RadioButton's own TextColor ignored.
Description of Change
Bug fix: Prevent global Label styles from interfering with RadioButton text color
ContentLabelclass inContentConverter.csthat uses a self-hosted empty style to block inherited globalLabelstyles, ensuring thatRadioButtontext color is not overridden.ConvertToLabelmethod inContentConverter.csto useContentLabelinstead ofLabelfor plain text content, preventing interference from global styles.Testing and verification
TestCases.Shared.Tests/Tests/Issues/Issue18011.csto verify that theRadioButtontext color is not overridden by globalLabelstyles.TestCases.HostApp/Issues/Issue18011.csthat sets a globalLabelstyle and demonstrates the issue, confirming the fix and cleaning up styles after the test.Issues Fixed
Fixes #18011
Tested the behaviour in the following platforms
Output