[Android] Fix Circle Stroke color is incorrectly updated as Fill color.#33643
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug in the Android map handler where the circle's stroke color was incorrectly being assigned to the fill color property, causing visual rendering issues. The fix ensures that mauiCircle.Stroke correctly updates nativeCircle.StrokeColor instead of nativeCircle.FillColor.
Changes:
- Fixed the stroke color assignment bug by changing
nativeCircle.FillColortonativeCircle.StrokeColorwhen processing theStrokeproperty - Added braces around if statements for improved code readability
| if (nativeCircle == null) | ||
| { | ||
| return; | ||
|
|
||
| } | ||
|
|
||
| if (mauiCircle.Stroke is SolidPaint solidPaint) | ||
| nativeCircle.FillColor = solidPaint.Color.AsColor(); | ||
| { | ||
| nativeCircle.StrokeColor = solidPaint.Color.AsColor(); | ||
| } | ||
|
|
||
| if (mauiCircle.Fill is SolidPaint solidFillPaint) | ||
| { | ||
| nativeCircle.FillColor = solidFillPaint.Color.AsColor(); | ||
| } |
There was a problem hiding this comment.
The added braces around the null check, Stroke assignment, and Fill assignment are inconsistent with the coding style used elsewhere in this file. The PolygonOnPropertyChanged and PolylineOnPropertyChanged methods (lines 142-171) use the same patterns without braces for single-statement if blocks. For consistency with the existing codebase, consider removing the braces from these if statements to match the style of similar methods in this file.
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Fixed - 33642 ·
|
| File:Line | Reviewer Says | Author Says | Status |
|---|---|---|---|
| MapHandler.Android.cs:179-191 | Remove extra braces for style consistency | Added braces for readability/clarity |
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33643 | Change nativeCircle.FillColor → nativeCircle.StrokeColor in Stroke branch; add braces |
⏳ PENDING (Gate) | MapHandler.Android.cs (+7/-2) |
Original PR fix |
Test Status
Issue33642 or Issue33643 were found in TestCases.HostApp or TestCases.Shared.Tests. Gate phase cannot be verified without tests.
Prior Agent Review
A prior agent review was posted on 2026-02-18. Same commit SHA (5374f289). Findings are consistent with this review. Importing prior findings.
🚦 Gate — Test Verification
📝 Review Session — Fixed - 33642 · 5374f28
Result: ❌ FAILED — No tests exist for this issue
Platform: android
Mode: N/A — No tests to run
Gate Status
No UI test files were found for issue #33642 or PR #33643:
src/Controls/tests/TestCases.HostApp/Issues/Issue33642*— NOT FOUNDsrc/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33642*— NOT FOUND
The PR does not include any automated tests to verify the fix. Gate verification cannot be performed without tests.
Action Required: Tests must be added before Gate can pass. The write-tests-agent can help create UI tests for this issue.
The bug is a Map control Android-only issue — an automated UI test should:
- Create a Map with a Circle element that has an initial StrokeColor
- Trigger a StrokeColor change at runtime
- Verify the circle's stroke color updates (not the fill color)
Gate: ❌ FAILED (no tests)
🔧 Fix — Analysis & Comparison
📝 Review Session — Fixed - 33642 · 5374f28
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33643 | Change nativeCircle.FillColor → nativeCircle.StrokeColor in Stroke branch; add braces |
⏳ PENDING (Gate) | MapHandler.Android.cs (+7/-2) |
Original PR |
Exhausted: N/A — Gate failed (no tests exist). try-fix skipped as a result.
Selected Fix: PR's fix — The bug is a trivially correct one-line fix (FillColor → StrokeColor in the Stroke branch). No alternative exploration was possible without tests to validate against.
Reason Phase Skipped
Gate ❌ FAILED because no UI tests exist for this issue. try-fix was also skipped since it requires Gate to pass first and functioning tests to validate against.
The fix itself is clearly correct — PolygonOnPropertyChanged in the same file shows the correct pattern:
if (mauiPolygon.Stroke is SolidPaint solidPaint)
nativePolygon.StrokeColor = solidPaint.Color.AsColor(); // correct pattern📋 Report — Final Recommendation
📝 Review Session — Fixed - 33642 · 5374f28
⚠️ Final Recommendation: REQUEST CHANGES
Summary
PR #33643 fixes a clear one-line copy-paste bug in CircleOnPropertyChanged on Android where the Stroke property update was incorrectly setting nativeCircle.FillColor instead of nativeCircle.StrokeColor. The core bug fix is correct and necessary. However, the PR has issues that should be addressed before merge:
- No tests — No automated tests were added; the PR cannot be merged without tests to prevent regression
- Style inconsistency — Added braces conflict with the existing brace-free style in sibling methods in the same file
- Inaccurate description — Claims "explicit null check added" but the null check already existed
Root Cause
Copy-paste bug in CircleOnPropertyChanged — when the Stroke branch was written, it mistakenly assigned nativeCircle.FillColor (same as the Fill branch) instead of nativeCircle.StrokeColor. This caused any runtime update to Circle.StrokeColor on Android to visually update the fill color instead of the stroke.
Fix Quality
The one-line fix (FillColor → StrokeColor) is correct. The adjacent PolygonOnPropertyChanged method shows the correct pattern:
if (mauiPolygon.Stroke is SolidPaint solidPaint)
nativePolygon.StrokeColor = solidPaint.Color.AsColor(); // ✅ correct patternPR Finalization Review
⚠️ Title: Needs Minor Update
Current: [Android] Fixed Circle Stroke color is incorrectly updated as Fill color.
Recommended: [Android] Map: Fix Circle stroke color incorrectly updating fill color
Issues:
- Starts with "Fixed" (past tense). PR titles should use present tense "Fix"
- Verbose — can be shortened
- Missing component qualifier "Map"
⚠️ Description: Needs Updates
Issues with current description:
- ❌ Missing required NOTE block at the top
- ❌ Inaccurate: Claims "Added braces and an explicit null check for
nativeCircle" — the null check already existed, only braces were added around the existingreturn;statement - ❌ Missing root cause context (copy-paste bug)
Suggested description:
<!-- 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
In `CircleOnPropertyChanged` in `MapHandler.Android.cs`, a copy-paste error caused `nativeCircle.FillColor` to be set from `mauiCircle.Stroke` (the stroke property) instead of `nativeCircle.StrokeColor`. At runtime, any update to `Circle.StrokeColor` on Android would incorrectly update the fill color instead of the stroke.
### Description of Change
Fixes `CircleOnPropertyChanged` in `MapHandler.Android.cs`:
- **Bug fix:** Changed `nativeCircle.FillColor = solidPaint.Color.AsColor()` → `nativeCircle.StrokeColor = solidPaint.Color.AsColor()` in the `mauiCircle.Stroke` branch, so the stroke color is now correctly applied.
- **Code clarity:** Added braces around single-statement `if` blocks.
The bug only affected Android; iOS was not affected.
### Issues Fixed
Fixes #33642Code Review Findings
🔴 Missing Tests
No UI test files were added for this issue. Tests are required to prevent regression.
Missing files:
src/Controls/tests/TestCases.HostApp/Issues/Issue33642.cs— MISSINGsrc/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33642.cs— MISSING
Use write-tests-agent to create tests that:
- Create a Map with a Circle that has an initial StrokeColor
- Trigger a StrokeColor change at runtime via button click
- Verify the stroke color updates correctly (not fill color)
🟡 Style Inconsistency — Extra Braces
The PR adds braces around single-statement if blocks in CircleOnPropertyChanged, but the sibling methods PolygonOnPropertyChanged (lines 142-157) and PolylineOnPropertyChanged (lines 159-171) use the brace-free style throughout. This inconsistency was also flagged by the Copilot reviewer in an unresolved code review comment.
Sibling method style (existing, no braces):
if (nativePolygon == null)
return;
if (mauiPolygon.Stroke is SolidPaint solidPaint)
nativePolygon.StrokeColor = solidPaint.Color.AsColor();PR's CircleOnPropertyChanged (with braces — inconsistent):
if (nativeCircle == null)
{
return;
}
if (mauiCircle.Stroke is SolidPaint solidPaint)
{
nativeCircle.StrokeColor = solidPaint.Color.AsColor();
}Suggested (consistent with file style):
if (nativeCircle == null)
return;
if (mauiCircle.Stroke is SolidPaint solidPaint)
nativeCircle.StrokeColor = solidPaint.Color.AsColor();
if (mauiCircle.Fill is SolidPaint solidFillPaint)
nativeCircle.FillColor = solidFillPaint.Color.AsColor();
nativeCircle.Center = new LatLng(mauiCircle.Center.Latitude, mauiCircle.Center.Longitude);
nativeCircle.Radius = mauiCircle.Radius.Meters;
nativeCircle.StrokeWidth = (float)mauiCircle.StrokeThickness;✅ Core Fix is Correct
The one-line fix (nativeCircle.FillColor → nativeCircle.StrokeColor in the Stroke branch) correctly resolves the bug. The Fill branch was already correct and remains untouched. No public API changes, no breaking changes. Android-only scope is appropriate.
Phases Summary
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Issue #33642 confirmed Android-only bug |
| Gate | ❌ FAILED | No UI tests exist for this issue |
| Fix | Gate did not pass (no tests to validate against) | |
| Report | ✅ COMPLETE | Code review performed; REQUEST CHANGES |
📋 Expand PR Finalization Review
Title: ✅ Good
Current: [Android] Fixed Circle Stroke color is incorrectly updated as Fill color.
Description: ⚠️ Needs Update
- Trailing period should be removed
- "Fixed" is past tense — MAUI PR titles use imperative form ("Fix", not "Fixed")
- Describes the bug symptom rather than the fix
- Missing component name ("Map") for better searchability
- Title is long and verbose
✨ 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!
Description of Change
This pull request fixes a bug in the CircleOnPropertyChanged method of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor.
Root Cause: A copy-paste error in CircleOnPropertyChanged caused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name.
Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties.
Issues Fixed
Fixes #33642
Code Review: ✅ Passed
Code Review — PR #33643
File: src/Core/maps/src/Handlers/Map/MapHandler.Android.cs
✅ Looks Good
Core bug fix is correct.
The one-line change:
// Before (bug):
nativeCircle.FillColor = solidPaint.Color.AsColor(); // from mauiCircle.Stroke
// After (fix):
nativeCircle.StrokeColor = solidPaint.Color.AsColor(); // from mauiCircle.StrokeThis is the correct fix. The Stroke property of ICircleMapElement should map to StrokeColor on the native Circle object, not FillColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged already use StrokeColor correctly for their stroke assignments.
🟡 Suggestions
Unnecessary brace additions create style inconsistency
File: src/Core/maps/src/Handlers/Map/MapHandler.Android.cs
Lines: 179–190 (the modified CircleOnPropertyChanged method)
The PR adds braces to all single-statement if blocks in CircleOnPropertyChanged:
// Added by this PR (with braces):
if (nativeCircle == null)
{
return;
}
if (mauiCircle.Stroke is SolidPaint solidPaint)
{
nativeCircle.StrokeColor = solidPaint.Color.AsColor();
}However, the adjacent sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged (immediately above in the same file) use the no-brace style:
// Existing style in PolygonOnPropertyChanged / PolylineOnPropertyChanged:
if (nativePolygon == null)
return;
if (mauiPolygon.Stroke is SolidPaint solidPaint)
nativePolygon.StrokeColor = solidPaint.Color.AsColor();Recommendation: Remove the added braces from CircleOnPropertyChanged to match the style of PolygonOnPropertyChanged and PolylineOnPropertyChanged. The braces are not necessary for correctness and the inconsistency makes the method stand out without reason.
Note: This was already flagged by the automated Copilot reviewer in review comment (unresolved).
No Other Issues Found
The change is minimal and targeted. No performance, null safety, or behavioral concerns beyond the above.
…r. (#33643) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> This pull request fixes a bug in the `CircleOnPropertyChanged` method of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor. Root Cause: A copy-paste error in `CircleOnPropertyChanged` caused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name. Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties. Bug fix and code clarity improvements: * Fixed assignment to set `nativeCircle.StrokeColor` (instead of `FillColor`) from the `Stroke` property, ensuring the circle's stroke color is updated correctly. * Added braces and an explicit null check for `nativeCircle` to improve code readability and prevent potential null reference errors. ### 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 #33642 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Output | Before | After | |--|--| | <video src="https://github.com/user-attachments/assets/f3559741-e794-403c-a590-c9c871f25995"> |<video src="https://github.com/user-attachments/assets/6174a836-082c-4ae8-9a93-09649b92f9b6"> |
…r. (#33643) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> This pull request fixes a bug in the `CircleOnPropertyChanged` method of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor. Root Cause: A copy-paste error in `CircleOnPropertyChanged` caused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name. Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties. Bug fix and code clarity improvements: * Fixed assignment to set `nativeCircle.StrokeColor` (instead of `FillColor`) from the `Stroke` property, ensuring the circle's stroke color is updated correctly. * Added braces and an explicit null check for `nativeCircle` to improve code readability and prevent potential null reference errors. ### 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 #33642 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Output | Before | After | |--|--| | <video src="https://github.com/user-attachments/assets/f3559741-e794-403c-a590-c9c871f25995"> |<video src="https://github.com/user-attachments/assets/6174a836-082c-4ae8-9a93-09649b92f9b6"> |
…r. (#33643) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> This pull request fixes a bug in the `CircleOnPropertyChanged` method of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor. Root Cause: A copy-paste error in `CircleOnPropertyChanged` caused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name. Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties. Bug fix and code clarity improvements: * Fixed assignment to set `nativeCircle.StrokeColor` (instead of `FillColor`) from the `Stroke` property, ensuring the circle's stroke color is updated correctly. * Added braces and an explicit null check for `nativeCircle` to improve code readability and prevent potential null reference errors. ### 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 #33642 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Output | Before | After | |--|--| | <video src="https://github.com/user-attachments/assets/f3559741-e794-403c-a590-c9c871f25995"> |<video src="https://github.com/user-attachments/assets/6174a836-082c-4ae8-9a93-09649b92f9b6"> |
…r. (#33643) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> This pull request fixes a bug in the `CircleOnPropertyChanged` method of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor. Root Cause: A copy-paste error in `CircleOnPropertyChanged` caused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name. Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties. Bug fix and code clarity improvements: * Fixed assignment to set `nativeCircle.StrokeColor` (instead of `FillColor`) from the `Stroke` property, ensuring the circle's stroke color is updated correctly. * Added braces and an explicit null check for `nativeCircle` to improve code readability and prevent potential null reference errors. ### 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 #33642 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Output | Before | After | |--|--| | <video src="https://github.com/user-attachments/assets/f3559741-e794-403c-a590-c9c871f25995"> |<video src="https://github.com/user-attachments/assets/6174a836-082c-4ae8-9a93-09649b92f9b6"> |
…r. (dotnet#33643) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> This pull request fixes a bug in the `CircleOnPropertyChanged` method of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor. Root Cause: A copy-paste error in `CircleOnPropertyChanged` caused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name. Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties. Bug fix and code clarity improvements: * Fixed assignment to set `nativeCircle.StrokeColor` (instead of `FillColor`) from the `Stroke` property, ensuring the circle's stroke color is updated correctly. * Added braces and an explicit null check for `nativeCircle` to improve code readability and prevent potential null reference errors. ### 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#33642 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Output | Before | After | |--|--| | <video src="https://github.com/user-attachments/assets/f3559741-e794-403c-a590-c9c871f25995"> |<video src="https://github.com/user-attachments/assets/6174a836-082c-4ae8-9a93-09649b92f9b6"> |
…r. (#33643) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> This pull request fixes a bug in the `CircleOnPropertyChanged` method of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor. Root Cause: A copy-paste error in `CircleOnPropertyChanged` caused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name. Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties. Bug fix and code clarity improvements: * Fixed assignment to set `nativeCircle.StrokeColor` (instead of `FillColor`) from the `Stroke` property, ensuring the circle's stroke color is updated correctly. * Added braces and an explicit null check for `nativeCircle` to improve code readability and prevent potential null reference errors. ### 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 #33642 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Output | Before | After | |--|--| | <video src="https://github.com/user-attachments/assets/f3559741-e794-403c-a590-c9c871f25995"> |<video src="https://github.com/user-attachments/assets/6174a836-082c-4ae8-9a93-09649b92f9b6"> |
## What's Coming .NET MAUI inflight/candidate introduces significant improvements across all platforms with focus on quality, performance, and developer experience. This release includes 46 commits with various improvements, bug fixes, and enhancements. ## Button - [Android] Implemented material3 support for Button by @Dhivya-SF4094 in #33173 <details> <summary>🔧 Fixes</summary> - [Implement Material3 support for Button](#33172) </details> ## CollectionView - [Android] Fix RemainingItemsThresholdReachedCommand not firing when CollectionView has Header and Footer both defined by @SuthiYuvaraj in #29618 <details> <summary>🔧 Fixes</summary> - [Android : RemainingItemsThresholdReachedCommand not firing when CollectionVew has Header and Footer both defined](#29588) </details> - [iOS/MacCatalyst] Fix CollectionView ScrollTo for horizontal layouts by @Shalini-Ashokan in #33853 <details> <summary>🔧 Fixes</summary> - [[iOS/MacCatalyst] CollectionView ScrollTo does not work with horizontal Layout](#33852) </details> - [iOS & Mac] Fixed IndicatorView Size doesnt update dynamically by @SubhikshaSf4851 in #31129 <details> <summary>🔧 Fixes</summary> - [[iOS, Catalyst] IndicatorView.IndicatorSize does not update dynamically at runtime](#31064) </details> - [Android] Fix for CollectionView Scrolled event is triggered on the initial app load. by @BagavathiPerumal in #33558 <details> <summary>🔧 Fixes</summary> - [[Android] CollectionView Scrolled event is triggered on the initial app load.](#33333) </details> - [iOS, Android] Fix for CollectionView IsEnabled=false allows touch interactions by @praveenkumarkarunanithi in #31403 <details> <summary>🔧 Fixes</summary> - [More issues with CollectionView IsEnabled, InputTransparent, Opacity via Styles and code behind](#19771) </details> - [iOS] Fix VerticalOffset Update When Modifying CollectionView.ItemsSource While Scrolled by @devanathan-vaithiyanathan in #34153 <details> <summary>🔧 Fixes</summary> - [[iOS]VerticalOffset Not Reset to Zero After Clearing ItemSource in CollectionView](#26798) </details> ## DateTimePicker - [Android] Fix DatePicker MinimumDate/MaximumDate not updating dynamically by @HarishwaranVijayakumar in #33687 <details> <summary>🔧 Fixes</summary> - [[regression/8.0.3] [Android] DatePicker control minimum date issue](#19256) - [[Android] DatePicker does not update MinimumDate / MaximumDate in the Popup when set in the viewmodel after first opening](#33583) </details> ## Drawing - Android drawable perf by @albyrock87 in #31567 ## Editor - [Android] Implemented material3 support for Editor by @SyedAbdulAzeemSF4852 in #33478 <details> <summary>🔧 Fixes</summary> - [Implement Material3 Support for Editor](#33476) </details> ## Entry - [iOS, Mac] Fix for CursorPosition not updating when typing into Entry control by @SyedAbdulAzeemSF4852 in #30505 <details> <summary>🔧 Fixes</summary> - [Entry control CursorPosition does not update on TextChanged event [iOS Maui 8.0.7] ](#20911) - [CursorPosition not calculated correctly on behaviors events for iOS devices](#32483) </details> ## Flyoutpage - [Android, Windows] Fix for FlyoutPage toolbar button not updating on orientation change by @praveenkumarkarunanithi in #31962 <details> <summary>🔧 Fixes</summary> - [Flyout page in Android does not show flyout button (burger) consistently](#24468) </details> - Fix for First Item in CollectionView Overlaps in FlyoutPage.Flyout on iOS by @praveenkumarkarunanithi in #29265 <details> <summary>🔧 Fixes</summary> - [[iOS] CollectionView not rendering first item correctly in FlyoutPage.Flyout](#29170) </details> ## Image - [Android] Fix excessive memory usage for stream and resource-based image loading by @Shalini-Ashokan in #33590 <details> <summary>🔧 Fixes</summary> - [[Android] Unexpected high Bitmap.ByteCount when loading image via ImageSource.FromResource() or ImageSource.FromStream() in .NET MAUI](#33239) </details> - [Android] Fix for Resize method returns an image that has already been disposed by @SyedAbdulAzeemSF4852 in #29964 <details> <summary>🔧 Fixes</summary> - [In GraphicsView, the Resize method returns an image that has already been disposed](#29961) - [IIMage.Resize bugged behaviour](#31103) </details> ## Label - Fixed Label Span font property inheritance when applied via Style by @SubhikshaSf4851 in #34110 <details> <summary>🔧 Fixes</summary> - [`Span` does not inherit text styling from `Label` if that styling is applied using `Style` ](#21326) </details> - [Android] Implemented material3 support for Label by @SyedAbdulAzeemSF4852 in #33599 <details> <summary>🔧 Fixes</summary> - [Implement Material3 Support for Label](#33598) </details> ## Map - [Android] Fix Circle Stroke color is incorrectly updated as Fill color. by @NirmalKumarYuvaraj in #33643 <details> <summary>🔧 Fixes</summary> - [[Android] Circle Stroke color is incorrectly updated as Fill color.](#33642) </details> ## Mediapicker - [iOS] Fix: invoke MediaPicker completion handler after DismissViewController by @yuriikyry4enko in #34250 <details> <summary>🔧 Fixes</summary> - [[iOS] Media Picker UIImagePickerController closing issue](#21996) </details> ## Navigation - Fix ContentPage memory leak on Android when using NavigationPage modally (fixes #33918) by @brunck in #34117 <details> <summary>🔧 Fixes</summary> - [[Android] Modal TabbedPage whose tabs are NavigationPage(ContentPage) is retained after PopModalAsync()](#33918) </details> ## Picker - [Android] Implement material3 support for TimePicker by @HarishwaranVijayakumar in #33646 <details> <summary>🔧 Fixes</summary> - [Implement Material3 support for TimePicker](#33645) </details> - [Android] Implemented Material3 support for Picker by @SyedAbdulAzeemSF4852 in #33668 <details> <summary>🔧 Fixes</summary> - [Implement Material3 support for Picker](#33665) </details> ## RadioButton - [Android] Implemented material3 support for RadioButton by @SyedAbdulAzeemSF4852 in #33468 <details> <summary>🔧 Fixes</summary> - [Implement Material3 Support for RadioButton](#33467) </details> ## Setup - Clarify MA003 error message by @jeremy-visionaid in #34067 <details> <summary>🔧 Fixes</summary> - [MA003 false positive with 9.0.21](#26599) </details> ## Shell - [Android] Fix TabBar FlowDirection not updating dynamically by @SubhikshaSf4851 in #33091 <details> <summary>🔧 Fixes</summary> - [[Android, iOS] FlowDirection RTL is not updated dynamically on Shell TabBar](#32993) </details> - [Android] Fix page not disposed on Shell replace navigation by @Vignesh-SF3580 in #33426 <details> <summary>🔧 Fixes</summary> - [[Android] [Shell] replace navigation leaks current page](#25134) </details> - [Android] Fixed Shell flyout does not disable scrolling when FlyoutVerticalScrollMode is set to Disabled by @NanthiniMahalingam in #32734 <details> <summary>🔧 Fixes</summary> - [[Android] Shell.FlyoutVerticalScrollMode="Disabled" does not disable scrolling](#32477) </details> ## Single Project - Fix: Throw a clear error when an SVG lacks dimensions instead of a NullReferenceException by @Shalini-Ashokan in #33194 <details> <summary>🔧 Fixes</summary> - [MAUI Fails To Convert Valid SVG Files Into PNG Files (Object reference not set to an instance of an object)](#32460) </details> ## SwipeView - [iOS] Fix SwipeView stays open on iOS after updating content by @devanathan-vaithiyanathan in #31248 <details> <summary>🔧 Fixes</summary> - [[iOS] - Swipeview with collectionview issue](#19541) </details> ## TabbedPage - [Windows] Fixed IsEnabled Property not works on Tabs by @NirmalKumarYuvaraj in #26728 <details> <summary>🔧 Fixes</summary> - [ShellContent IsEnabledProperty does not work](#5161) - [[Windows] Shell Tab IsEnabled Not Working](#32996) </details> - [Android] Fix NavigationBar overlapping StatusBar when NavigationBar visibility changes by @Vignesh-SF3580 in #33359 <details> <summary>🔧 Fixes</summary> - [[Android] NavigationBar overlaps with StatusBar when mixing HasNavigationBar=true/false in TabbedPage on Android 15 (API 35)](#33340) </details> ## Templates - Fix for unable to open task using keyboard navigation on windows platform by @SuthiYuvaraj in #33647 <details> <summary>🔧 Fixes</summary> - [Unable to open task using keyboard: A11y_.NET maui_User can get all the insights of Dashboard_Keyboard](#30787) </details> ## TitleView - Fix for NavigationPage.TitleView does not expand with host window in iPadOS 26+ by @SuthiYuvaraj in #33088 ## Toolbar - [iOS] Fix toolbar items ignoring BarTextColor on iOS/MacCatalyst 26+ by @Shalini-Ashokan in #34036 <details> <summary>🔧 Fixes</summary> - [[iOS 26] ToolbarItem color with custom BarTextColor not working](#33970) </details> - [Android] Fix for ToolbarItem retaining the icon from the previous page on Android when using NavigationPage. by @BagavathiPerumal in #32311 <details> <summary>🔧 Fixes</summary> - [Toolbaritem keeps the icon of the previous page on Android, using NavigationPage (not shell)](#31727) </details> ## WebView - [Android] Fix WebView in a grid expands beyond it's cell by @devanathan-vaithiyanathan in #32145 <details> <summary>🔧 Fixes</summary> - [Android - WebView in a grid expands beyond it's cell](#32030) </details> ## Xaml - ContentPresenter: Propagate binding context to children with explicit TemplateBinding by @HarishwaranVijayakumar in #30880 <details> <summary>🔧 Fixes</summary> - [Binding context in ContentPresenter](#23797) </details> <details> <summary>🔧 Infrastructure (1)</summary> - [Revert] ContentPresenter: Propagate binding context to children with explicit TemplateBinding by @Ahamed-Ali in #34332 </details> <details> <summary>🧪 Testing (6)</summary> - [Testing] Feature Matrix UITest Cases for Shell Flyout Page by @NafeelaNazhir in #32525 - [Testing] Feature Matrix UITest Cases for Brushes by @LogishaSelvarajSF4525 in #31833 - [Testing] Feature Matrix UITest Cases for BindableLayout by @LogishaSelvarajSF4525 in #33108 - [Android] Add UI tests for Material 3 CheckBox by @HarishwaranVijayakumar in #34126 <details> <summary>🔧 Fixes</summary> - [[Android] Add UI tests for Material 3 CheckBox](#34125) </details> - [Testing] Feature Matrix UITest Cases for Shell Tabbed Page by @NafeelaNazhir in #33159 - [Testing] Fixed Test case failure in PR 34294 - [03/2/2026] Candidate - 1 by @TamilarasanSF4853 in #34334 </details> <details> <summary>📦 Other (2)</summary> - Bumps Syncfusion.Maui.Toolkit dependency to version 1.0.9 by @PaulAndersonS in #34178 - Fix crash when closing Windows based app when using TitleBar by @MFinkBK in #34032 <details> <summary>🔧 Fixes</summary> - [Unhandled exception "Value does not fall within the expected range" when closing Windows app](#32194) </details> </details> **Full Changelog**: main...inflight/candidate
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!
Description of Change
This pull request fixes a bug in the
CircleOnPropertyChangedmethod of the Android map handler where the circle's stroke color was incorrectly applied to FillColor instead of StrokeColor.Root Cause: A copy-paste error in
CircleOnPropertyChangedcaused the Stroke paint to be assigned to nativeCircle.FillColor instead of nativeCircle.StrokeColor. The sibling methods PolygonOnPropertyChanged and PolylineOnPropertyChanged correctly set StrokeColor, but the circle method had the wrong property name.Fix: Changed the assignment from nativeCircle.FillColor to nativeCircle.StrokeColor when mapping mauiCircle.Stroke to the native circle, ensuring stroke and fill colors are applied to the correct native properties.
Bug fix and code clarity improvements:
nativeCircle.StrokeColor(instead ofFillColor) from theStrokeproperty, ensuring the circle's stroke color is updated correctly.nativeCircleto improve code readability and prevent potential null reference errors.Issues Fixed
Fixes #33642
Output
Before.mov
After.mov