我要这个:
public partial class ucTest : UserControl
{
...
SomeEvent { MessageBox.Show("Inner Call") }
}
public partial class frmTest: Form
{
...
SomeEvent += OuterEventInstance;
...
void OuterEventInstance(object sender, EventArgs e)
{ MessageBox.Show("Inner Call") }
...
}
如何在包含此用户控件实例的表单中定义可用(且可扩展)的用户控件上的公共事件?