CodePudding user response:
If it is WPF:The mouse trigger MouseDown,
According to the touch trigger TouchDown,
If it is Windows:
Try to [OnPreviewTouchUp] and [OnPreviewTouchMouseUp]
Protected override void OnPreviewTouchUp (TouchEventArgs e)
{
OnPreviewTouchMouseUp (e);
}
Private void OnPreviewTouchMouseUp (EventArgs e)
{
}
CodePudding user response:
If you want to do is touch the hook, you need to walk the RawInput events [WPF use the RawInput receive naked data] (https://blog.lindexi.com/post/WPF-%E4%BD%BF%E7%94%A8-RawInput-%E6%8E%A5%E6%94%B6%E8%A3%B8%E6%95%B0%E6%8D%AE.html)