locked
How to use touch gestures in Silverlight? RRS feed

  • Question

  • Hi, I am using a multi-touch screen with WEC7 in a Silverlight application. However, I do not receive some gestures like DIRECT MANIPULATION... What am I doing wrong? I have SYSGEN_TOUCHGESTURE, SYSGEN_PHYSICSENGINE and SYSGEN_GESTUREANIMATION included in my OS. Also QueryGestures() tells me, that all gestures are on! Help!


    	HRESULT GestureEH(IXRDependencyObject* pSender, XRGestureEventArgs* pArgs);
    	IXRDelegate<XRGestureEventArgs, IXRDependencyObject>* m_pGestureEH;
    
    CMenuDesktop::CMenuDesktop()
    {
    	CreateDelegate(this, &CMenuDesktop::GestureEH, &m_pGestureEH);
    
    	m_pGUI->m_p_1_Test->AddGestureEventHandler(m_pGestureEH);
    };
    
    CMenuDesktop::~CMenuDesktop()
    {
    	m_pGUI->m_p_1_Test->RemoveGestureEventHandler(m_pGestureEH);
    
    	m_pGestureEH->Release();
    };
    
    HRESULT CMenuDesktop::GestureEH(IXRDependencyObject* pSender, XRGestureEventArgs* pArgs)
    {
    return NOERROR;
    }

    Tuesday, March 12, 2013 12:27 PM

Answers

  • Windows Gesture Engine will send PAN / SCROLL messages OR DIRECT_MANIPULATION. Those are two different modes, so while being in first mode, user will never get any GID_DIRECTMANIPULATION.

    http://msdn.microsoft.com/en-gb/library/jj823204.aspx

    http://msdn.microsoft.com/en-gb/library/jj823191.aspx

    • Marked as answer by mariuszjg Thursday, March 21, 2013 2:36 PM
    Thursday, March 21, 2013 2:36 PM

All replies

  • Tuesday, March 12, 2013 12:41 PM
  • Thank you for the answer, but I've read that even before. I reveive all the GIDs, apart from GID_DIRECTMANIPULATION and GID_END. QueryGestures() tells me, that all GIDs are enabled. Any idea?
    Tuesday, March 12, 2013 2:03 PM
  • Windows Gesture Engine will send PAN / SCROLL messages OR DIRECT_MANIPULATION. Those are two different modes, so while being in first mode, user will never get any GID_DIRECTMANIPULATION.

    http://msdn.microsoft.com/en-gb/library/jj823204.aspx

    http://msdn.microsoft.com/en-gb/library/jj823191.aspx

    • Marked as answer by mariuszjg Thursday, March 21, 2013 2:36 PM
    Thursday, March 21, 2013 2:36 PM