I have defined ArrayList in my main Win app that contains several myUserControls:
public ArrayList myUserControls = new ArrayList();
Further I have defined an event in myUserControl:
public event EventHandler ClosePanel;
private void uxClosePanelBtn_Click(object sender, System.EventArgs e)
this.ClosePanel(this, new System.EventArgs());
When I drag myUserControl to my MainForm, I can see the event and access it.
In the app I will not have any static myUserControl. I will add all of them on runtime.
How can I implement the event and how can I get the id / name / index via the event object sender?
Thanks a lot for helping!