public MainWindow() { InitializeComponent(); QueryList queryList = new QueryList(); queries = queryList.Load(); combobox.ItemsSource = queries.OrderBy(i => i.Name);; }
public MainWindow() { InitializeComponent(); PersonList people = new PersonList(); var listp = people.Load(); PersonList = new ObservableCollection <Person>(listp); QueryList queries = new QueryList(); var listq = queries.Load(); QueryList = new ObservableCollection <Query>(listq); combobox.ItemsSource = QueryList; combobox.SelectedIndex = 0; }