我有以下列表框:
<ListBox ItemsSource="{Binding AvailableTemplates}" Style="{DynamicResource SearchListBoxStyle}" SelectedItem="{Binding SelectedTemplate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding}" GroupName="group" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Run Code Online (Sandbox Code Playgroud)
如果我选择radiobutton,这不会检测到所选项目已更改.它只检测我是否在列表框行上的单选按钮下单击.任何想法如何修改以检测单击单选按钮时所选项目的变化?
wpf ×1