Conversation
| { | ||
| /// <include file="../../docs/Microsoft.Maui.Controls/RadioButton.xml" path="Type[@FullName='Microsoft.Maui.Controls.RadioButton']/Docs/*" /> | ||
| public partial class RadioButton : TemplatedView, IElementConfiguration<RadioButton>, ITextElement, IFontElement, IBorderElement, IRadioButton | ||
| public partial class RadioButton : TemplatedView, IElementConfiguration<RadioButton>, IContentView, ITextElement, IFontElement, IBorderElement, IRadioButton |
There was a problem hiding this comment.
To get the RadioButton working with the compiled binding in ContentPresenter, needs to implement IContentView.Content.
To get ContentPresenter correctly working in all the cases, we must apply the same changes to:
- TitleBar
- IndicatorView
Classes from Controls that inherit from TemplatedView.
Waiting for feedback to proceed and also include tests related to those classes, or just keep what is related to RadioButton here.
There was a problem hiding this comment.
Alternative c6c2cee
Just revert the binding change in the ContentPresenter, but this change was necessary to make MAUI trimmable.
There was a problem hiding this comment.
I've modified the PR slightly
I think it's still relevant even with the alternative changes.
With Simons changes RB will still fall through to the unsafe path, so we need it to still react correctly and not go the unsafe path with warnings.
PureWeen
left a comment
There was a problem hiding this comment.
So I think @mattleibow is on to something here.
It does feel like this should work
#24949 (comment)
I tested locally real quick and it didn't work, but, there might just be something simple that needs to be added/fixed
|
/backport to release/9.0.1xx |
|
Started backporting to release/9.0.1xx: https://github.com/dotnet/maui/actions/runs/11958376858 |
Description of Change
Fix RadioButton using ContentPresenter not rendering on Android. Found the cause of the problem. The binding from ContentPresenter changed here 4c3a09c#diff-f01d408e1d2b3cd4a4c1bcf731586c215c9d57d4585d6815d5c89118a1ef3f44R20 (changes to allow trimming).
This PR apply changes to implement
IContentView.Contentin the RadioButton class.Issues Fixed
Fixes #25887
The changes here, will also fix #24949