Question

When I place a byte tag on my Surface table the tag is recognized by tag visualizer as it should, and shows a tag visualization (just a black circle) beneath the tagged object.

Underneath my tag visualization is a WPF Bing map control.

Here is the problem: The map is treating the recognized tag as a touch point. For TouchFrameEventArgs e produced when the tag is placed on the screen:

e.GetTouchPoints(myMap)
Count = 1
[0]: {Microsoft.Surface.Presentation.Input.SurfaceTouchPoint}

The map control gets a touch point even though the TouchDevice for this touchPoint is captured by the TagVisualizer and NOT the map:

_touchPoint.TouchDevice.Captured.ToString()
"Microsoft.Surface.Presentation.Controls.TagVisualizer"

Why does this happen? That is, why does the map control get a touch point after the TagVisualizer has captured the tag?

This is a problem because when a tag is on the table, the map cannot be panned and zoomed normally with other touches...because it is treating the tag as another finger! I would like to make this stop!

The tag visualizer is across the entire screen, thus the entire app is a child element of the visualizer.

I am working on a program for a device made for Surface, an actual MS Surface Table (Samsung SUR40), and developing my program on a normal touchscreen monitor not designed for surface (testing on it using the input simulator). Interestingly this problem occurs on the actual Surface table, but the symptoms are different on the monitor not made for Surface (i.e. using Input Simulator).

I have tried:

this.myMap.ReleaseTouchCapture(_touchPoint.TouchDevice);

...after recognizing the touch event of the tag itself, but this does not do anything since the touch has not been actually captured by the map control.

Can anyone help with this? Does anyone know how the Bing Maps WPF control uses touch events? Or how the TagVisualizer treats tags as touches?

Many Thanks!

Was it helpful?

Solution

After some more troubleshooting on this, it appears that the touch events coming from the tag were actually from the physical object outside the tag area. I covered the object with IR-absorbing black (to make it invisible to the IR camera) and that eliminated the touch events. Problem solved!

It turns out that the TagVisualizer does not send a touch event when a tag is recognized.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top