当前位置:首页 > Windows程序 > 正文

WPF_RadioButton使用

标签:highlight   sch   显示   垂直   radio   改变颜色   大小   sharp   div   

属性说明

Content=“radioButton” //显示信息
IsChecked=“True” //默认选中
GroupName=“carSize” //多个单选框设置同一GroupName,则只能多选一,实现单选效果
HorizontalAlignment=“Left” //控件位置-水平居中
VerticalAlignment=“Top” //控件位置-垂直居中
FontSize=“12” //文字大小
FontWeight=“Bold” //文字加粗显示


选中时改变颜色

        private void radioButton1_Checked(object sender, EventArgs e)
        {
            this.radioButton1.ForeColor =
            this.radioButton1.Checked ?
            Color.Red :
            Color.Black;
        }

  

WPF_RadioButton使用

标签:highlight   sch   显示   垂直   radio   改变颜色   大小   sharp   div   

温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/file/14357.html