O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling the tap touch event

In the previous recipes, you learned how to handle the event of tapping a control placed on a page. However, in this recipe, you will learn how to get an exact location where the user tapped the canvas, taking into account the multi-touch feature.

As an example, you will create a page with the Canvas control. After tapping it, an ellipse should be drawn in such a place. Of course, in the case of multi-touch, more than one shape will be added at the same time.

Getting ready

To step through this recipe, you need only the automatically generated project.

How to do it...

To prepare the example that handles the tap touch event and adds an ellipse in each pressed location, perform the following steps:

  1. Add a canvas (where the ellipses ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required