Open vsfeedback opened 1 month ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I've pulled this reproduction and do see the issue with click/touch events not registering and will have to look into it. This may have something to do with the way the Control Template is applied when set in the styles.xml file in the Resources folder, although I'd have to look into that a bit more.
A workaround I've found for now is to explicitly setting the style in the xaml itself, while still defining the Control Template in the styles.xml file (although I understand this is not ideal)
<VerticalStackLayout Margin="10" Spacing="10" RadioButtonGroup.GroupName="Colors" RadioButtonGroup.SelectedValue="false">
<VerticalStackLayout.Resources>
<Style TargetType="RadioButton">
<Setter Property="ControlTemplate" Value="{StaticResource RadioButtonControlTemplate}"/>
</Style>
</VerticalStackLayout.Resources>
<Label Text="What's your favorite color?" />
<RadioButton GroupName="Colors" Content="Red" />
<RadioButton GroupName="Colors" Content="Green" />
<RadioButton GroupName="Colors" Content="Blue" />
<RadioButton GroupName="Colors" Content="Other" />
</VerticalStackLayout>
This issue has been moved from a ticket on Developer Community.
[severity:I'm unable to use this version] When using a
ControlTemplate
to change the visual representation of a .NET MAUIRadioButton
control, the control stops working on iOS and MacCatalyst, but works correctly on Windows and Android.The
ControlTemplate
is defined as:and the template is applied to
RadioButton
object via a style:You can reproduce the issue by following these steps using the reproduction project at: https://github.com/hunsra/RBCT
Steps:
Original Comments
Feedback Bot on 4/16/2024, 06:39 PM:
(private comment, text removed)
Original Solutions
(no solutions)