I have a ComboBox associated with a property with a specific value and "due to some specific data state" the ComboBox does not contain any elements (ItemsSource is empty). The ComboBox attempts to find an element with a specific value using the binding to the SelectedValue Property of the ComboBox, which it does not find and displays the error message " The value" cannot be converted ".
A simplified example:
ID = 80; <ComboBox DisplayMemberPath="Value" SelectedValuePath="ID" SelectedValue="{Binding ID}"> <ComboBox.Items> </ComboBox.Items> </ComboBox>
I am aware of the status of the ComboBox and I would like to configure this message for example, for example. localized value "The selected value cannot be found, check the accuracy of the records."
How can i do this?
source share