如果您从Jason的建议开始,那么问题将成为列表中的一个单一边界选择,该列表非常好地转换为
ListBox。那时,将样式应用于
ListBox控件以使其显示为
RadioButton列表很简单。
<ListBox ItemsSource="{Binding ...}" SelectedItem="{Binding ...}"> <ListBox.ItemContainerStyle> <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <RadioButton Content="{TemplateBinding Content}" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsSelected}"/> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListBox.ItemContainerStyle></ListBox>


