private void SetupForm() { // Fill genre //GenreDropDown.ItemsSource = FillGenreDropDown(); //FillGenreDropDown(); // Fill length - math!!!! LengthDropDown.ItemsSource = FillLengthDropDown(); // Fill director - ajax too? DirectorsBox.ItemsSource = Directors; DirectorsBox.PopulateComplete(); WritersBox.ItemsSource = Writers; WritersBox.PopulateComplete(); // Actors ActorBox.ItemsSource = Actors; ActorBox.PopulateComplete(); // Titles TitleBox.ItemsSource = Titles; TitleBox.PopulateComplete(); RatingsDropDown.SelectionChanged += (cbSender, cbe) => { ComboBox cb = cbSender as ComboBox; if (cb.SelectedItem is CheckedListItem && ((CheckedListItem)cb.SelectedItem).Selectable == false) { cb.SelectedIndex = -1; } }; RatingsDropDown.ItemsSource = Ratings; cmb.SelectionChanged += (cbSender, cbe) => { ComboBox cb = cbSender as ComboBox; if (cb.SelectedItem is CheckedListItem && ((CheckedListItem)cb.SelectedItem).Selectable == false) { cb.SelectedIndex = -1; } }; cmb.ItemsSource = AvailableGenres; }
private void ActorBoxPopulating(object sender, PopulatingEventArgs e) { ActorBox.ItemsSource = Actors; ActorBox.PopulateComplete(); }