自己加啊,类似于这样:
this.image1.MouseLeftDown += new System.EventHandler(this.iamge1_MouseLeftButtonDown)然后再把你的MouseLeftDown事件定义出来:
private void iamge1_MouseLeftButtonDown(object sender, EventArgs e){
//...
}
Storyboard s = new Storyboard()this.Resources.Add(Guid.NewGuid().ToString(), s)
DoubleAnimation da = new DoubleAnimation()
Storyboard.SetTarget(da, 你的Image)
Storyboard.SetTargetProperty(da, new PropertyPath("Opacity", new object[]{}))
da.From = 0
da.To = 1
s.Duration = new Duration(TimeSpan.FromSecond(1))
s.Children.Add(da)
s.Begin()
手敲的没验证呢 如果有问题不好意思啦
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)