Exemplo n.º 1
0
 private void ConfigureAuthorsComboBoxes()
 {
     AuthorCombobox.SelectedIndex = Authors.IndexOf(BookView.Authors.ToList()[0]);
     if (BookView.Authors.Count > 1)
     {
         for (int i = 1; i < BookView.Authors.Count; i++)
         {
             AddingAuthorCombobox(this, new RoutedEventArgs());
             var authorAdding = (AuthorAdding)AuthorsStackPanel.Children[i - 1];
             var combobox     = authorAdding.AuthorComboBox;
             combobox.SelectedIndex = Authors.IndexOf(BookView.Authors.ToList()[i]);
         }
     }
 }