MS Surface Tag Visualizer steals contact events

Posted by Isak Savo on Stack Overflow See other posts from Stack Overflow or by Isak Savo
Published on 2010-04-30T09:55:53Z Indexed on 2010/04/30 9:57 UTC
Read the original article Hit count: 375

I'm struggling with the TagVisualizer control on an MS Surface project. In theory the control seems great, allowing you to respond to input from real world physical objects

The problem is that the control will cover the entire screen (since I want to capture tags on the entire screen) and as such, no other controls in my app will receive the touch events. (Unless, they are direct ascendants in the visual tree).

In my app, I want to have a "layer" type of a approach, where each layer can respond to (contact) input:

Window
  `- Grid
      `- LayersPanel
          `- TagVisualizer
          `- Layer 1
          `- Layer 2
          `- Layer 3
          `- Layer 4    

Now it doesn't matter where I put the tag visualizer, it's always going to steal contact events from all or some of the other layers. (due to the nature of RoutedEvents)

To me, it seems like the control is completely useless in practice as it will always interfere with your application's other controls. What am I missing here?

So my questions are: Any suggestions on how to work around this? Has anyone used TagVisualizers in a similar scenario? If so, how did you solve this?

By the way, the layers all work fine, since they will only steal events that are directly on top of their sub elements (the rest of the layer is invisible to hit testing)

© Stack Overflow or respective owner

Related posts about wpf

Related posts about microsoft-surface