WPF 模拟Button按钮事件触发

this.Submit.AddHandler(Button.ClickEvent, new RoutedEventHandler(this.Submit_Click)); //这种是无效的方法

 this.Submit.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); //这种是有效的方法 

原文地址:https://www.cnblogs.com/pang572936554/p/10239160.html