The Selection completely depends on the
SelectedValuePath
. Check if whether is are setting CustomerID (which should be available in CustomerDataSource) as
SelectedValuePath
.
Let me put it simple,
If you haven't specified the
SelectedValuePath
, you need to pass Customer as
SelectedValue
If you have specified
SelectedValuePath
as CustomerID, you need to pass CustomerID as
SelectedValue
.
Something like below,
<ComboBox SelectedValuePath="CustomerID" SelectedValue="{Binding Path=CustomerID}" ItemsSource="{Binding Source={StaticResource CustomerDataSource}}" />