PointerPressed

PointerPressed is a high level function that will be triggered before any control clicked / touched gets their Tapped event.

using Windows.UI.Core;
Add to the Page_Loading
	//----- REGISTER FOR THE POINTER PRESSED EVENT SO WE GET ALL SCREEN TOUCHES / CLICKS -----
	Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
Add to the Page_Unloaded
	Window.Current.CoreWindow.PointerPressed -= CoreWindow_PointerPressed;
Method that will be called
	//******************************************
	//******************************************
	//********** PAGE HAS BEEN TAPPED **********
	//******************************************
	//******************************************
	//Will occur for any touch or click anywhere on the page
	private void CoreWindow_PointerPressed(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.PointerEventArgs args)
	{
		try
		{
			//Flag that keypress has been handled (to stop it repeating forever)
			args.Handled = true;


		}
		catch (Exception ex)
		{
			System.Diagnostics.Debug.WriteLine("Exception: " + ex.Message);
		}
	}
UK Electronic Designer
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.