I have a dynamically created ComboBox that I need to set the SelectionChanged property for. How can I do this from code?
ComboBox comboBox = new ComboBox()
{
Background = Brushes.GhostWhite,
BorderBrush = Brushes.Gainsboro,
BorderThickness = new Thickness(1),
Margin = new Thickness(10),
ItemsSource = new ObservableCollection<string>(list),
SelectionChanged = "comboBox_SelectionChanged" //SelectionChanged is not a valid property
};