private void OnLoaded(object sender, RoutedEventArgs e) { Authors = ApplicationDbContext.Instance.Authors.LoadAsObservableCollection(); StoragePlaces = ApplicationDbContext.Instance.StoragePlaces.LoadAsObservableCollection(); PublishingHouses = ApplicationDbContext.Instance.PublishingHouses.LoadAsObservableCollection(); SeriesList = ApplicationDbContext.Instance.Series.LoadAsObservableCollection(); Categories = ApplicationDbContext.Instance.Categories.LoadAsObservableCollection(); if (!BookView.Authors.IsNullOrEmpty()) { ConfigureAuthorsComboBoxes(); } if (!BookView.Categories.IsNullOrEmpty()) { ConfigureCategoriesComboBox(); } CategoriesCombobox.ItemsSource = EnumSorter.GetSortedByDescriptions <CategoryName>(); LanguageComboBox.ItemsSource = EnumSorter.GetSortedByDescriptions <Language>(); }
public CategoryAdding() { InitializeComponent(); CategoryComboBox.ItemsSource = EnumSorter.GetSortedByDescriptions <CategoryName>(); }