private void FilterBox_Loaded2(object sender, RoutedEventArgs e) { ComboBox b = sender as ComboBox; b.IsTextSearchEnabled = false; b.ItemsSource = BonusTypes.ToList(); }
public void Add(BonusType bonusType) { if (bonusType == null) { throw new ArgumentNullException(nameof(bonusType)); } var list = BonusTypes.ToList(); list.Add(bonusType); BonusTypes = list.ToArray(); }
public void Remove(IReadOnlyCollection <BonusType> bonusTypes) { if (bonusTypes == null) { throw new ArgumentNullException(nameof(bonusTypes)); } var list = BonusTypes.ToList(); list.RemoveAll(bonusTypes.Contains); BonusTypes = list.ToArray(); }