I have a radio button which i have created programatically and in some condition i need to make this radio button to read only. I also tried RadioButton.IsEnable = false; but after that nothing is showing in my app it is looking like visibility.Collapsed of my radio button.
This code i am using for create radio button:
RadioButton radbtn = new RadioButton();
radbtn.Name = choicelist[ctr].ID;
radbtn.Content = choicelist[ctr].Name;
radbtn.Foreground = new SolidColorBrush(Colors.Black);
radbtn.VerticalAlignment = System.Windows.VerticalAlignment.Center;
I want to set this radio button as read only.
HI i found the solution for this and it works for me.