-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Issue-Resolver] Fix #33264 - RadioButtonGroup not working with Collection View #33343
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
Changes from all commits
80b78d3
cc7196b
a88b938
0b1eed3
27e5cb6
0aa6b4a
291f775
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,8 @@ public RadioButtonGroupController(Maui.ILayout layout) | |
| } | ||
|
|
||
| _layout = (Element)layout; | ||
| _layout.ChildAdded += ChildAdded; | ||
| _layout.ChildRemoved += ChildRemoved; | ||
| _layout.DescendantAdded += DescendantAdded; | ||
| _layout.DescendantRemoved += DescendantRemoved; | ||
|
Comment on lines
+25
to
+26
|
||
|
|
||
| if (!string.IsNullOrEmpty(_groupName)) | ||
| { | ||
|
|
@@ -50,7 +50,7 @@ internal void HandleRadioButtonGroupSelectionChanged(RadioButton radioButton) | |
| _layout.SetValue(RadioButtonGroup.SelectedValueProperty, radioButton.Value); | ||
| } | ||
|
|
||
| void ChildAdded(object sender, ElementEventArgs e) | ||
| void DescendantAdded(object sender, ElementEventArgs e) | ||
| { | ||
| if (string.IsNullOrEmpty(_groupName) || _layout == null) | ||
| { | ||
|
|
@@ -61,19 +61,9 @@ void ChildAdded(object sender, ElementEventArgs e) | |
| { | ||
| AddRadioButton(radioButton); | ||
| } | ||
| else | ||
| { | ||
| foreach (var element in e.Element.Descendants()) | ||
| { | ||
| if (element is RadioButton childRadioButton) | ||
| { | ||
| AddRadioButton(childRadioButton); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| void ChildRemoved(object sender, ElementEventArgs e) | ||
| void DescendantRemoved(object sender, ElementEventArgs e) | ||
| { | ||
| if (e.Element is RadioButton radioButton) | ||
| { | ||
|
|
@@ -82,19 +72,6 @@ void ChildRemoved(object sender, ElementEventArgs e) | |
| groupControllers.Remove(radioButton); | ||
| } | ||
| } | ||
| else | ||
| { | ||
| foreach (var element in e.Element.Descendants()) | ||
| { | ||
| if (element is RadioButton radioButton1) | ||
| { | ||
| if (groupControllers.TryGetValue(radioButton1, out _)) | ||
| { | ||
| groupControllers.Remove(radioButton1); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| internal void HandleRadioButtonValueChanged(RadioButton radioButton) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.