wpf中图片
星空う繁华 2021-05-17 11:19:03 private void imgLamp2_MouseUp(object sender, MouseButtonEventArgs e)
{
if (isOpen)
{
imgLamp2.Source = new BitmapImage(new Uri("images/LampOff.png", UriKind.Relative));
isOpen = false;
}
else
{
imgLamp2.Source = new BitmapImage(new Uri("images/LampOn.png", UriKind.Relative));
isOpen = true;
}
}
这是wpf中一段程序 这个if(isopen)中isopen有什么用?
imgLamp2.Source = new BitmapImage(new Uri("images/LampOn.png", UriKind.Relative));
还有大佬能不能说明一下上面这一行程序各个段的意思 ? 谢谢了!