private bool CanSubmit() { // wegen Trim() muss mit "?" sichergestellt werden, dass Trim() gar nicht ausgeführt wird, wenn NewComboboxItem null ist return(!(string.IsNullOrEmpty(NewComboboxItem?.Trim())) && !ComboBoxListe.Contains(NewComboboxItem)); }
private void Delete() { ComboBoxListe.Remove(SelectedComboboxItem); }
private void Submit() { ComboBoxListe.Add(NewComboboxItem); NewComboboxItem = string.Empty; }