views:

53

answers:

1

Hi,

I have several pages in my windows phone/silverlight project in a constructor of one of the pages added touch event handler like this:

Touch.FrameReported += Touch_FrameReported;

The problem is that it works for all the pages in my project, but I need to limit it just to one page. How can I do that?

How to make local touch event handler for windows phone page?

A: 

Call

Touch.FrameReported += Touch_FrameReported; 

when the page is activated, not constructed. Call

Touch.FrameReported -= Touch_FrameReported; 

when the page is deactivated.

Michael S. Scherotter