GroupBox 里面只能有一个content
所以我们需要在里面添加一个布局控件
比如stack
<GroupBox x:Name="groupBox" Header="GroupBox" >
<StackPanel>
<RadioButton Name="r1" Content="篮球"></RadioButton>
<RadioButton Name="r2" Content="足球"></RadioButton>
<RadioButton Name="r3">网球</RadioButton>
<RadioButton Name="r4">羽毛球</RadioButton>
</StackPanel>
</GroupBox>Code language: HTML, XML (xml)
<Grid>
<GroupBox Name="gBox" Header="注册信息">
<StackPanel>
<Button>1</Button>
<ListBox>
</ListBox>
<RadioButton>1</RadioButton>
<RadioButton>1</RadioButton>
<RadioButton>1</RadioButton>
<RadioButton>1</RadioButton>
<CheckBox>122</CheckBox>
<CheckBox>122</CheckBox>
<CheckBox>122</CheckBox>
<CheckBox>122</CheckBox>
<Image></Image>
<Rectangle Fill="Red" Height="10"></Rectangle>
</StackPanel>
</GroupBox>
</Grid>Code language: HTML, XML (xml)
Previous: 14-选项卡控件的使用
Next: 16-文本控件的使用