Repository navigation
[iOS/Mac] Fix Button with gradient Background ignores CornerRadius - #39484
Merged
kubaflo merged 2 commits intoOct 21, 2026
Merged
Conversation
HarishwaranVijayakumar
temporarily deployed
to
copilot-pat-pool
October 20, 2026 06:23 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39484Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39484" |
HarishwaranVijayakumar
temporarily deployed
to
copilot-pat-pool
October 20, 2026 06:23 — with
GitHub Actions
Inactive
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Hey there @@HarishwaranVijayakumar! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
HarishwaranVijayakumar
temporarily deployed
to
copilot-pat-pool
October 20, 2026 06:24 — with
GitHub Actions
Inactive
HarishwaranVijayakumar
temporarily deployed
to
copilot-pat-pool
October 20, 2026 06:26 — with
GitHub Actions
Inactive
HarishwaranVijayakumar
temporarily deployed
to
copilot-pat-pool
October 20, 2026 06:28 — with
GitHub Actions
Inactive
HarishwaranVijayakumar
temporarily deployed
to
copilot-pat-pool
October 20, 2026 06:28 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Tests Failure Analysis
🧪 CI Analysis — click to expand📊 maui-prNo failures found. 🧪 maui-pr-devicetests
🧪 maui-pr-uitests
🧭 Follow-up — actions and refreshNext action: Compare unresolved Mac cases with/without the Button change under identical setup; collect hang/crash diagnostics and missing Shell2 outcomes.
|
This was referenced Nov 16, 2026
Open
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Description of Change
Button background rendering improvements:
UpdateBackgroundextension method inButtonExtensions.csto accept an optionalIButtonStrokeparameter, allowing the background rendering logic to respect the button'sCornerRadius. The method now passes this parameter to the underlying view background update logic.MapBackgroundmethod inButtonHandler.iOS.csto pass the button instance as the stroke parameter when updating the background, ensuring the platform view can access theCornerRadiusproperty.Test coverage:
Issue39450.cs) to verify that various button backgrounds—linear gradient, radial gradient, and visual state-driven backgrounds—are clipped to the rounded corners as expected.Issue39450.csinTestCases.Shared.Tests) that toggles button visual states and checks via screenshots and label assertions that the background remains within the rounded borders.Issues Fixed
Fixes #39450
Tested the behavior in the following platforms
Output