How can I raise a custom Routed Event from user control?

后端 未结 1 1609
清酒与你
清酒与你 2021-02-13 19:23

In my user control I have a button that, when clicked, would raise a custom Routed Event. I\'ve attempted to raise it, but it doesn\'t get fired in the MainWindow.xaml.

1条回答
  •  悲&欢浪女
    2021-02-13 19:43

    You need to call

    RaiseEvent(new RoutedEventArgs(AddClickEvent));
    

    0 讨论(0)
提交回复
热议问题