I have a Windows Forms DropDown element called tsmiSendFeedback. I’m trying to bind to its click event. The method I have in place to do this is the following:
private static void tsmiSendFeedback_Click(object sender, EventArgs e)
{
SubmitFeedbackDialog.ShowRequestDialog();
}
I set the debugger in that method, run the program, click the element, and it doesn’t even make it there. No error, just never hits the breakpoint. It’s happening seemingly with every dropdown element in this specific dropdown, but other ones on the page work fine. They are all done in the same fashion though.
Does anyone have any ideas?
Sounds like your designer messed something up.
You need to make sure that the OnClick of that button is assigned to that event handler. You can do this by double clicking on the button again in the designer, or more reliably (if option A hasn’t worked), you can go into the designer.cs file and assign the OnClick to that event manually.
In the designer.cs file, add the following: