在你的用户控件A中你可以像这样公开控件B的事件......
public event EventHandler EventA
{
add { _control.EventB += value; }
remove { _control.EventB -= value; }
}
Run Code Online (Sandbox Code Playgroud)
您应该查看事件B正在使用的委托,并确保事件A匹配.在这个例子中,我刚刚选择了EventHandler,因为在开发用户控件时这很常见
public delegate void EventHandler(object sender, EventArgs e);
Run Code Online (Sandbox Code Playgroud)