You are binding ItemsSource
to LotNumber
, which is a string. The expected value for ItemsSource
is a collection of objects to display in the dropdown.
Since string
is not "a collection of objects", your binding is probably failing.
What you want to do is create a collection of available values (use a List<string>
if your collection is static, or an ObservableCollection<string>
if the collection is dynamic and can be changed at runtime) and bind your ItemsSource
property to that
<ComboBox ItemsSource="{Binding AllAvailableLotNumbers}"
SelectedItem="{Binding LotNumber}" />