我现在又遇到这样的一个绑定问题:
我有个List 大概是这样的:
List={Name=“A”,Name="B",Name="C"....}
然后我想把这个List绑定在ListBox上,绑定代码如下:
<ListBox ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding Name}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
运行结果,绑定是绑定上了,但是RadioButton的效果不对了,因为这里面的RadioButton选中不是唯一性,变成的CheckBox的效果了,我个人认为他把每个ListBoxItem的RadioButton作为一个Group了,我想请问下,有没有其他方法让RadioButton绑定后全在一个group里?谢谢!