XAML
xaml.cs
foreach (RadioButton rb in GroupBox:Name FirstGroupBox)) {
}
does not work. How do I retrieve every RadioButton in the GroupBox?
XAML
xaml.cs
foreach (RadioButton rb in GroupBox:Name FirstGroupBox)) {
}
does not work. How do I retrieve every RadioButton in the GroupBox?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sangeetha SPosted Dec 2, 2024, 5:03 AM
To retrieve all
RadioButtoncontrols within aGroupBoxin your XAML, you can use a simple method to iterate through the children of theGroupBox. Here's how you can do it in yourxaml.csfile:In this code:
FirstGroupBox.RadioButtonusing theiskeyword.