WPF手动触发MouseUp
自己向写一个自定义 listBox 控件,使它拥有HoverTime事件。代码如下:
this.OnTimeUp(this,new EventArgs());
System.Windows.MessageBox.Show("Yes");
};
timeHover.Interval = new TimeSpan(0, 0, 0, nHoverTimeSenconds, nHoverTimeMilliseconds);
}
在外面写
image.OnTimeUp+= image_MouseUp; // MouseUp 是在这里写的代码