C# 鼠标向下和触摸屏

C# 鼠标向下和触摸屏,c#,C#,我对C#MouseDown事件有问题。当我使用触摸屏触摸鼠标向下标签一次时,无论何时触摸下一步都会触发事件。但当我用鼠标点击它时,一切似乎都很好 以下是我的标签鼠标按下事件示例代码: lblEAForm = new Label(); lblEAForm.Name = "lblEAForm"; lblEAForm.Width = 240; lblEAForm.Height = 250; lblEAForm.HorizontalAlignment = System.Windows.Horizonta

我对C#
MouseDown
事件有问题。当我使用触摸屏触摸鼠标向下标签一次时,无论何时触摸下一步都会触发事件。但当我用鼠标点击它时,一切似乎都很好

以下是我的标签鼠标按下事件示例代码:

lblEAForm = new Label();
lblEAForm.Name = "lblEAForm";
lblEAForm.Width = 240;
lblEAForm.Height = 250;
lblEAForm.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
lblEAForm.Margin = new Thickness(20);
lblEAForm.Background = new ImageBrush(new BitmapImage(new Uri("pack://application:,,,/Images/BorangEA.png")));
Grid.SetColumn(lblEAForm, 1);
Grid.SetRow(lblEAForm, 0);
lblEAForm.MouseDown += ShowGUIEAForm;
下面是它应该调用的函数:

public void msg(object sender, EventArgs e)
{
    MessageBox.Show("Clicked");
}

我不确定我做错了什么。有人能帮忙吗?

试着让
MessageBox
显示在
MouseUp
MouseDown
事件有时有点不稳定。您是否也在MouseDown中使用鼠标单击事件?谢谢…我现在改为“鼠标向上”,一切正常。