WPF: Raise programmatically a SelectionChangedEvent
问题 in WPF, I want raise programmatically a SelectionChanged event on a combobox. I've tried the following code but it doesn't work: myComboBox.RaiseEvent(new RoutedEventArgs(ComboBox.SelectionChangedEvent, myComboBox)); How can i raise that event? Thanks 回答1: While the other answers here are good practice, they don't actually answer your question. To actually answer your question of programmatically raising a SelectionChangedEvent, you could do something like the following: RoutedEvent routed =