Click lable wpf trigger text box checked

<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;
}

Guess you like

Origin www.cnblogs.com/lovebear123/p/11121823.html