C#/WPF

[WPF] Button Click 이벤트 발생 시키기 (PerformClick)

kjun.kr 2021. 7. 22. 12:01
728x90

 

 


testButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));

위처럼 CheckBox 이벤트도 처리할수 있다


testCheckBox.RaiseEvent(new RoutedEventArgs(CheckBox.CheckedEvent));
testCheckBox.RaiseEvent(new RoutedEventArgs(CheckBox.UncheckedEvent));

728x90