I have been working AT this for two days now, the simplest one I could explain what I'm trying to do is on this website if you search for "C# - handling WPF usercontrol events in winforms".
It uses a Radio Button, but the code doesn't work, I have been searching Google and nothing gives me the correct answer, always something wrong.
I want the textbox to have text in stating User has clicked the radio button, the event does not get the data from usercontrol, the code in WPF seems fine, the Form1 needs to pick up that the event happened.
public Form1()
{
InitializeComponent();
UserControl1.onRadioButtonClick += UserControl1.ucRadioButtonHandler(userControl11_onRadioButtonClick);
}
void userControl11_onRadioButtonClick(object sender, ucButtonEventArgs e)
{
System.Windows.Controls.RadioButton rb = (System.Windows.Controls.RadioButton)sender;
textBox1.Text = "User Selected Radiobutton";
}
Type or namespace name 'ucButtonEventArgs' could not be found and Object refrence is required for the non static field.
If anyone can point me in the right direction. Thank you