multi touch - WPF Multitouch simulation: Why TouchDevice.Id is 258? -
i follow these steps download multi-touch vista , configure simulate finger touch using multiple mice.
it works well, have 2 red dots on screen, each controlled mouse.
and write wpf application, has single window canvas, , in canvas's touchdown event handler, log finger (mouse) touching screen.
private void canvas_touchdown(object sender, toucheventargs e) { system.diagnostics.debug.writeline(e.touchdevice.id); } but surprise, id 258, no matter mouse use - expect starting 0 or 1, , id different between 2 fingers (mice).
i testing on win7 32bit.
i bought touch monitor , can test same code on new monitor. turns out id property useful when multiple touches (fingers/stylus) present, first touch device assigned "base id", second touch device assigned ("base id "+ 1), , on. on new touch monitor, when use ten fingers, assigned ids 428, 429, 430,..., 437.
i guess "base id" can vary on different monitors.
Comments
Post a Comment