Hi!
in a editable ComboBox that is binding to a Database, i want to check if text exist in ComboBox items.
<ComboBox DataContext="{StaticResource vehiclesViewSource}" DisplayMemberPath="vehicle" ItemsSource="{Binding}" TextBox.TextChanged="vehicleComboBox" IsEditable="True" IsTextSearchEnabled="True" IsTextSearchCaseSensitive="False"/>
bool itemExists =false;foreach(ComboBoxItem cbi in cb.Items){ itemExists = cbi.Content.Equals(cb.Text);if(itemExists)break;
...}
but i get a runtime exception