今天接着讲控件,说两个也是 最基本的,RadioButton 和 CheckBox 一个单选按钮一个是多选按钮。
非常简单页面的代码如下:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<CheckBox Name="chkApple" Content="苹果" />
<CheckBox Name="chkBanana" Content="香蕉" />
<CheckBox Name="chkMango" Content="芒果" />
<Button Name="btnOK"
Click="btnOK_Click"
Content="确认" />
</StackPa