2
如何通过codebehind.cs文件将IList
项绑定到ComboBox
。 请用简单的步骤解释。WPF combobox binding from
我需要双向绑定的步骤,而不是通过设置ItemsSource
。
我需要这样的东西:
myComboBox.SetBinding(ItemsControl.ItemsSourceProperty,
new Binding { Source = myList });
,但我需要的SelectedItem
也。
谢谢
上面它的工作原理时,路径=新PATHINFO(“的SelectedItem”) – nag 2012-05-28 11:52:36
@nag,感谢您指出了这一点 - 我已经纠正的代码片段。 – 2012-05-28 13:03:21