15-分组框控件的使用GroupBox

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)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注