-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] Fix for RadioButton BorderColor and BorderWidth not updated at runtime #28335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@jsuarezruiz , I have committed the pending snapshots. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default RadioButton border width is -1:
| public static readonly BindableProperty BorderWidthProperty = BindableProperty.Create(nameof(IBorderElement.BorderWidth), typeof(double), typeof(IBorderElement), -1d); |
In the sample, set the BorderColor (Normal state) to Red color but, not assign a value to BorderWidth.
The snapshot on any platform not render the border, as expected:

But on Windows:

Could you review it?
c7de3f2 to
aef8644
Compare
|
@jsuarezruiz , Previously, on Windows, if the BorderWidth was not explicitly specified, it would default to a Thickness object with a value of 3. As a result, the border would appear visible on Windows even though no border width was set, which could lead to inconsistencies in the UI across different platforms. Later it was fixed in this PR. In addition to setting the BorderColor, I have also included the BorderWidth in the test case to ensure consistent behavior across all platforms. This ensures that the border styling (both color and width) is applied uniformly, making the appearance of the RadioButton consistent regardless of the platform. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/rebase |
…cused visual state ).
…cused visual state ).
…cused visual state ).
…cused visual state ).
…cused visual state )
…cused visual state )
…cused visual state ).
3527aee to
6e71922
Compare
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some inconsistencies with how the RadioButton behaves across platforms. In the added sample, the normal and focused states use different colors—Red and DarkCyan, respectively.
- On Android, borders are completely missing, making selection unclear.
- The focus color is applied correctly on Windows, while other platforms do not display it properly.
- Additionally, the RadioButton expands to the full width of its container on most platforms, but Windows does not follow this behavior.
Could you review it? can we align the behavior between platforms?
|
@jsuarezruiz , The issue of RadioButton focus events not firing on iOS and Android has already been mentioned. Issue - 28163. |


Issue Details
Root Cause
Description of Change
Reference :
maui/src/Controls/src/Core/Button/Button.cs
Line 472 in ac01bde
Validated the behaviour in the following platforms
Issues Fixed
Fixes #15806
Output
RadioButtonBorderColorNotChanged.mp4
RadioButtonBorderColorChanged.mp4