public void modifyType(object sender, RoutedEventArgs arg) { if (TypeList.SelectedItem == null) { MessageBox.Show("Please select Type to change"); return; } if (ModifyType.Text == "") { MessageBox.Show("Cannot add blank name"); return; } ClientRequests.modifyType((String)TypeList.SelectedItem, ModifyType.Text); filter = ClientRequests.getFilters(); TypeList.ItemsSource = filter.types.Select(x => x.type); }