XAML
<GroupBox Name="FirstGroupBox" Header="1st" Margin="10,0,5,0" Height="auto" Width="auto" > <RadioButton x:Name="gRBuResearcher1" Content ="Researcher" Click="gRBuResearcher1_Click" /> <RadioButton x:Name="gRBuScientist1" Content="Scientist" Click="gRBuScientist1_Click" /> <RadioButton x:Name="gRBuMedic1" Content="Medic" Click="gRBuMedic1_Click" /> </GroupBox>
xaml.cs
foreach (RadioButton rb in GroupBox:Name FirstGroupBox)) { }
does not work. How do I retrieve every RadioButton in the GroupBox?