We rate touch keyboards, and for one we need to track 10 fingers at a time. The problem is that the touch screen driver is very warlike (and there is no fixed version). It sends 2500+ events for an event FrameReportedevery second for as many fingers. There is no way to deal with all these problems, even if we drop 90% at the beginning. It is simply impossible to maintain and do anything meaningful with data.
Instead, System.Windows.Input.Touch.FrameReportedI also tried to use events (Preview) TouchMovein the window; Here is the problem.
So, now I wanted, instead of using events, to poll a separate thread, but I can not find information on how to get all the current touch points.
The only thing I found was to hack WinForms, but this is not an option, since then I will not be able to display any WPF controls in my window.
Any solutions?
Edit 1:
This is the code that handles all move events:
private void UserControlTouchMove(object sender, TouchEventArgs e)
{
var touch = e.GetTouchPoint(this);
var id = touch.TouchDevice.Id;
e.Handled = true;
var position = touch.Position;
if (m_ShowFingers)
{
foreach (var finger in m_Fingers)
{
if (id == (int)finger.DataContext)
{
finger.RenderTransform = new TranslateTransform(position.X - HalfFingerSize, position.Y - HalfFingerSize);
break;
}
}
}
}
source
share