-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Radiobutton with ControlTemplate doesn't recognize Click Event Correctly #6938
Comments
I am also facing the exact same issue, the RadioButton with ControlTemplate doen't recognize touch or click events. I tested it on Android. |
verified repro on android 11 and 12 with the code. |
Same issue as well. The RadioButton with ControlTemplate does not recognize click events. Tested on Android. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I have the same problem on android devices. |
Hello, a workaround to solve is using a gesture like this:
And the code behind:
|
The TapGestureRecognizer is being correctly created and added to the templated RadioButton (in the |
Looking at #9370, this also might be an issue where the Frame is preventing the GestureRecognizer from firing. See this comment where clicking/tapping just outside of the framed area is firing the recognizer. |
#7121 might be a similar problem, based on this comment. |
Ran this and could confirm the issue on Android. A workaround for this example I verified to work is to replace the Frame with a Border. (to make that work in the repro above, the "BorderWidth" attribute would need to be replaced with "StrokeThickness"). This matches observations noted in the related issues noted above. If possible, I would suggest we make this change to the RadioButton tutorial that this example came from. As for the underlying fault in Frame, there is a PR in the works currently to fixing the issue in Frame (looks like InputTransparent property not propagating to Frame): #12218 |
I had the same issue, but I can style the radio button using a Control Template and works fine for iOS and Android .
|
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you! |
Description
When Radiobutton visual structure is redefined with a ControlTemplate, the click event is not recognized correctly by radio button:
1-by clicking inside Radiobutton, the the Radiobutton is not selected(Checked)
2-clicking outside the Radiobutton, change Radiobutton state to Selected(Checked) state.
Steps to Reproduce
1-Create a New MAUI Project
2-Add new Page
3-Code:(code is taken from Microsoft page @ Redefine RadioButton appearance)
Version with bug
Release Candidate 2 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 8-Android 9
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: