Add a delay to OnContactDown events for Surface controls

Posted by RTigger on Stack Overflow See other posts from Stack Overflow or by RTigger
Published on 2010-02-12T21:58:55Z Indexed on 2010/03/12 6:37 UTC
Read the original article Hit count: 358

Filed under:
|
|

We're using the Controls.PreviewContactDown, PreviewContactUp, and PreviewContactChanged events to capture tagged items being placed, removed, and moved on the Surface, which works great in the Simulator application that comes with the surface.

On an actual Surface if you moved a tagged item too quickly the cameras actually lose focus of the tag, assume it was removed, and then re-capture it when it stops moving. That provides a pretty poor experience for our clients.

What I'm proposing is a way to override or create a new event that would respond to tagged item events, but not fire the event handler until after a delay... i.e. if "ContactUp" is fired, wait 100ms and THEN execute the event handler. Ideally we'd just be able to use an alternate attached property to define these event handlers, i.e.

<Panel local:TagDown="TagDownEventHandler" />  

And if we could get it to use ICommand objects instead of event handlers that'd be even better.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about routedevent