Yogesh
Yogesh

Reputation: 1216

windows phone 7 - xna programming input gesture

Any events or how to recognize tap-down(touch down) and tap-up(touch up) as two different gesture in XNA +windows phone 7?

Upvotes: 0

Views: 650

Answers (1)

Yogesh
Yogesh

Reputation: 1216

here it goes:

TouchCollection touchCollection = TouchPanel.GetState();
        foreach (TouchLocation tl in touchCollection)
        {
            if (tl.State == TouchLocationState.Pressed)
            {
                  ...on touch down code
            }

            if (tl.State == TouchLocationState.Released)
            {
                  ...on touch up code
            }

        }

Upvotes: 1

Related Questions