我想将一个组合框绑定到一个对象列表,并且除了选定的值以外,它工作得很好,我是否缺少某些内容?组合框wpf不是项目未被选中
<ComboBox ItemsSource="{Binding OrderInfoVm.AllCountries}"
SelectedValuePath="country_code" DisplayMemberPath="country_name"
SelectedValue="{Binding OrderInfoVm.BillingCountry}" />
基本上我要绑定到值国家代码,并设置所选择的值绑定到OrderInfoVm.BillingCountry(其实现INotifyPropertyChanged)国家代码
当所选择的控制负载值是空的最初,但点击BillingCountry填充。选定的值似乎没有改变。我该如何补救?
'的SelectedValue =“{结合OrderInfoVm.BillingCountry.country_code}”的作品有所好转过的我在回答中给出的代码。但是,在这种情况下,文本框不会与组合框同步。使用SelectedItem! – Dabblernl 2010-03-21 01:54:55