Usually I add an event with the same name (and the same parameters) to the user control and subscribe to the original event of the child control, so I can pass the event to:
public partial class ClickEventControl : UserControl { public event EventHandler<RoutedEventArgs> Click; public ClickEventControl() { InitializeComponent(); } private void aButton_Click(object sender, RoutedEventArgs e) { if (Click != null) { Click(sender, e); } } }
I would also be wondering if there is a more general way to do this.
source share