This project is read-only.

Problems on MS Surface

Topics: Gesture Recognition Engine, Hardware Abstraction
Jun 3, 2011 at 6:26 PM

There are 2 problems I seem to be facing on the Surface:

1. Many primitive conditions (lasso,box,line,etc) do not get evaluated to true. For example

  RectangleParser parser = new RectangleParser();           

bool hasRect = parser.Advance(slopes);

hasRect would always be false.

2. Any gestures on the main canvas never get to the callback. When finding the source of the touchpoint (touchPoint.Source), the UI element returned is always {System.Windows.Controls.Border}. This happens in the GetUIElements method after the gesture has been evaluated to true.

Jun 3, 2011 at 6:27 PM

Gestures on images (like drag and zoom) work. 

Jun 6, 2011 at 3:33 AM

Hi Maha,

"lasso" is actually a gesture definition. Primitive conditions are those that you use in a definition (i.e. Touch state, Touch limit, etc) to define a gesture. The lasso gesture works for me in a DellXT2 laptop. I am guessing the size limit in the definition could cause an issue if the gesture is too small or big (or high res. device). In that case, you may try editing those limits.

Also I don't remember this code:

RectangleParser parser = new RectangleParser();           
bool hasRect = parser.Advance(slopes);

Is it part of gesturetoolkit? If so, would you please tell me the file name. 

Jun 6, 2011 at 3:36 AM

by the way, if you want to know more about the TouchShape primitive that validates different shapes (line, box...), please contact VnaP. He developed this one.

Jun 6, 2011 at 7:00 PM

RectangleParser is in the TouchShapeValidator class.

Concerning the lasso gesture, it fails at the shape recognition phase of the validation. I am not sure what to do about it.

Any solutions concerning the UIElement returned?

Thanks Shahed