I have several radiobuttons
on my form, each with a content
different. How do I get the radiobuttom
selected? Without having to método
to check one by one.
I have several radiobuttons
on my form, each with a content
different. How do I get the radiobuttom
selected? Without having to método
to check one by one.
You can use the event Checked
:
<RadioButton Name="radioButton1" Checked="radioButton_Checked">Opcao 1</RadioButton>
<RadioButton Name="radioButton2" Checked="radioButton_Checked">Opcao 2</RadioButton>
Function:
private void radioButton_Checked(object sender, RoutedEventArgs e)
{
opcaoEscolhida = (RadioButton)sender;
}