I need to write a C# WPF application to capture points on tablet PCs and I'm using an InkCanvas, but I don't find a way to selectively configure the InkCanvas to acquire only a combination of mouse, pen and touch points (for my scenario I'd only need only pen or only mouse, never touch). The solution must work from Windows XP to Windows 8.1.
I tried to write a StylusPlugin following this example but:
- RawStylusInput.StylusDeviceId doesn't return the same values on different tablet PCs;
- even if I'd manage to distinguish between mouse, pen and touch I can't use RawStylusInput.SetStylusPoints to drop the unneeded StylusPoints because that method doesn't accept as argument null or an empty StylusPointCollection.
This solution seems to work, but Real-Time Stylus is not so WPF-like and I'd like to use InkCanvas.