Wednesday, January 1, 2014

Radio button Checked Event throws null reference exception

here is some more simpler approach




private void rdiobtn_Checked(object sender, RoutedEventArgs e)
{
//include here some mothod to clear the previous state of secondRadioButton
//like in asp.net your can include secondRadioButton.ClearSelection();
//same way in window application also there must be some method, what you can in the intelsence
secondRadioButton.IsChecked = !firstRadioButton.IsChecked;
}



Please mark as answer, if you find this post helpful. Thanks Deepak Kalra


No comments:

Post a Comment