简单的问题,但我还没有找到答案:S,我目前有5个与图像链接的radiobuttons。我想在我的viewmodel中获取所选单选按钮的名称。我目前有这个XAML:
<StackPanel>
<RadioButton Name="r1">
<StackPanel>
<Image Source="c:\image.png" ></Image>
</StackPanel>
</RadioButton>
<RadioButton Name="r2">
<StackPanel >
<Image Source="c:\image.png"></Image>
</StackPanel>
</RadioButton>
<RadioButton Name="r3">
<StackPanel >
<Image Source="c:\image.png"></Image>
</StackPanel>
</RadioButton>
<RadioButton Name="r4">
<StackPanel >
<Image Source="c:\image.png"></Image>
</StackPanel>
</RadioButton>
<RadioButton Name="r5">
<StackPanel >
<Image Source="c:\image.png" ></Image>
</StackPanel>
</RadioButton>
</StackPanel>
如何在ViewModel中获取所选RadioButton的名称? 提前谢谢:))