How to make local touch event handler for windows phone page?
I have several pages in my windows phone/silverlight project in a constructor of one of the pages added touch event handler like this:
开发者_StackOverflow中文版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?
Call
Touch.FrameReported += Touch_FrameReported;
when the page is activated, not constructed. Call
Touch.FrameReported -= Touch_FrameReported;
when the page is deactivated.
精彩评论