When I have added a comboBox to the WPF window, how do I add items to the comboBox? Int the XAML code for the design or in NameOfWindow.xaml.cs file?
Its better to build ObservableCollection and take advantage of it
public ObservableCollection list = new ObservableCollection();
list.Add("a");
list.Add("b");
list.Add("c");
this.cbx.ItemsSource = list;
cbx is comobobox name
Also Read : Difference between List, ObservableCollection and INotifyPropertyChanged