RadioButton控件:单选按钮,在同一个容器中成对或两个以上出现时,只能有一个被选中。但不在同一个容器中的几组单选按钮彼此不关联,是可以有多个被选中的。
Checked属性:该属性是一个布尔类型的值,如果被选中,Checked的值为true,否则为false;默认值为false。
代码:
<Window x:Class="wpf.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Window1" Width="auto" Height="auto">
<Window.Resources>
<Style TargetType="RadioButton">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property