Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TouchDown event is delayed

My application uses the UiElement.TouchDown event in various places, one of them is to let the user stop a spinning wheel. In this situation, one can easily notice a short delay of about 1/3s between the actual touching of the screen and the TouchDown event.

I have set Stylus.IsPressAndHoldEnabled to false.

In order to troubleshoot this problem, I've written a test tool that reports WPF events and native window messages, and I noticed that as soon as I touched the screen, messages with id 0x02CC, 0x011B and 0x011A are generated, about 100 to 300 ms before the TouchDown event. This leads me to believe that the drivers report the touch quickly, and the delay is introduced somewhere later in the WPF translations.

Is there a way to make the touch interaction more responsive? Please ask for any information you need!

like image 846
Jens Avatar asked Mar 25 '26 20:03

Jens


1 Answers

Unless Flicks are needed set both in XAML or by manually setting in code behind: (I assume you meant to say IsPressAndHoldEnabled not IsTouchAndHoldEnabled)

Stylus.IsPressAndHoldEnabled="False" Stylus.IsFlicksEnabled="False" 

Furthermore consider handling the TouchDown Event and also capturing it to the relevant UIElement (don't forget to release it in TouchUp).

uielement.CaptureTouch(e.TouchDevice);
e.Handled = true;
like image 91
Jason Horrocks Avatar answered Mar 28 '26 10:03

Jason Horrocks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!