Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [Xamarin.Mac] RadioButton in detail page of master detail page : IsChecked not binding on launch, Multiple selection #13984

Closed
Suryask0 opened this issue Mar 10, 2021 · 4 comments · Fixed by #14139

Comments

@Suryask0
Copy link

Description

In XF 5.0.0.2012, On the detail page of a master detail page,

  • multiple radio buttons can be selected.
  • radio button is not checked on navigating to the page even when the IsChecked property is set true.

Steps to Reproduce

  1. Create a Master-detail page for Xamarin Forms app from the default template available on visual studio.
  2. Add a Mac project to it.
  3. Add few radio buttons to the detail page.
  4. Run the application on Mac platform.
  5. Select the radio buttons.

Expected Behavior

  • Only one radio button should be selected/checked at a time of one radio group.
  • The checked radio button should remain checked when launching the detail view.

Actual Behavior

  • Multiple radio buttons are getting checked in a radio group.
  • The radio buttons are not checked/selected when launching the detail view.

Basic Information

  • Version with issue: XF 5.0.02012

  • Last known good version:

  • Platform Target Frameworks:

    • Xamarin.Mac Modern
  • Android Support Library / AndroidX Version:

  • NuGet Packages:

  • Affected Devices:

Environment

Show/Hide Visual Studio info

Build Logs

Screenshots

Radio button multi select
Radiobutton_IsChecked not binding

Reproduction Link

Workaround

@Suryask0 Suryask0 added s/unverified New report that has yet to be verified t/bug 🐛 labels Mar 10, 2021
@jsuarezruiz jsuarezruiz added a/radiobutton 🔘 and removed s/unverified New report that has yet to be verified labels Mar 24, 2021
@JunielKatarn
Copy link
Contributor

JunielKatarn commented Apr 10, 2021

It appears the platform-specific RadioButtonRenderer's FormsNSButton Pressed and Released actions are not being set.
(Reproduced using Xamarin.Forms.ControlGallery.macOS).

			public override void MouseDown(NSEvent theEvent)
			{
				Pressed?.Invoke();

				base.MouseDown(theEvent);

				Released?.Invoke();
			}

@JunielKatarn
Copy link
Contributor

Also, seems like OnElementPropertyChanged is just not being called when selecting the radio button.

@JunielKatarn
Copy link
Contributor

Solved. See referencing PR.

Summary: No event coming from the NSButton control was being triggered.

@mhrastegari
Copy link
Contributor

Same issue here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants