日期:2014-05-18  浏览次数:20989 次

wpf中一组radiobutton为什么不能设默认选项?

C# code

<RadioButton Content="男" IsChecked="True" Tag="1"  Height="16" HorizontalAlignment="Left" Margin="16,16,0,0" GroupName="Sex" VerticalAlignment="Top" Checked="RadioButton_Checked" />
            <RadioButton Content="女"  Tag="2" Height="16" HorizontalAlignment="Left" Margin="103,16,0,0" VerticalAlignment="Top" GroupName="Sex" Grid.Column="1" Grid.Row="4" Checked="RadioButton_Checked" />



上面的代码,编辑后默认没有选中,而且不能首先选男, 要先选过女的后才可以选男的

------解决方案--------------------
不得哦,没有遇到过。不行试试在设计界面上面操作。