I’ve been trying to use a RadioButton to turn visible another. I am new to this enviroment and this is my first Windows Phone app.
My code:
private void rb1_Checked(object sender, RoutedEventArgs e)
{
RadioButton rb1 = new System.Windows.Controls.RadioButton();
if (rb1.IsChecked == true)
{
this.rb2.Visibility = Visibility.Visible;
}
else if (rb1.IsChecked == false)
{
this.rb2.Visibility = Visibility.Collapsed;
}
Isnt working well. I am trying to do this with Windows Phone Emulator. I already found something called autopostback, is there a similar property to Windows Phone too?
If I want to turn it dynamic?
The reason that is isn’t working is because you instantiate a new radio button called rb1. If there is already an rb1, then you can try this:
Try: