WPF的RadioButton--单选框

1. 使用, 显示的内容改为Content属性

     <RadioButton Content="boy"/>

2. 要使用分组,就是用 GroupName属性

<RadioButton Content="男" GroupName="sex"></RadioButton>
<RadioButton Content="女" GroupName="sex"></RadioButton>
<RadioButton Content="篮球" GroupName="sport"></RadioButton>
<RadioButton Content="足球" GroupName="sport"></RadioButton>

  

原文地址:https://www.cnblogs.com/tommy-huang/p/4609984.html