wpf 点击lable文字 触发复选框勾选

<CheckBox Name="PublcImgs" Margin="30,42,10,0" Cursor="Hand" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="95" Height="20" Padding="0" />
<Label Content="公开图库" Width="72" Height="22" Cursor="Hand" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="18" Foreground="#606266" Padding="0" MouseLeftButtonDown="Lbl_Checked"/>

 

cs:

private void Lbl_Checked(object sender, MouseButtonEventArgs e)
{
PublcImgs.IsChecked = !PublcImgs.IsChecked;
}

posted @ 2019-07-02 17:10  熊大的小跟班  阅读(1057)  评论(0编辑  收藏  举报