public static async Task<AffineTransformationParameters> CalibrateScreenAsync(ITouchDevice device, CalibrationStyle style = CalibrationStyle.CornersAndCenter)
		{
			var bounds = Windows.UI.Core.CoreWindow.GetForCurrentThread().Bounds;
			LcdCalibrationView view = new LcdCalibrationView(device);
			view.Width = bounds.Width;
			view.Height = bounds.Height;

			Popup p = new Popup() { Child = view, Margin = new Thickness(0), IsOpen = true };
            try
			{
				return await view.CalibrateAsync(style);
			}
			finally
			{
				p.IsOpen = false;
			}
		}
Esempio n. 2
0
        public static async Task <AffineTransformationParameters> CalibrateScreenAsync(ITouchDevice device, CalibrationStyle style = CalibrationStyle.CornersAndCenter)
        {
            var bounds = Windows.UI.Core.CoreWindow.GetForCurrentThread().Bounds;
            LcdCalibrationView view = new LcdCalibrationView(device);

            view.Width  = bounds.Width;
            view.Height = bounds.Height;

            var p = new Popup {
                Child = view, Margin = new Thickness(0), IsOpen = true
            };

            try
            {
                return(await view.CalibrateAsync(style));
            }
            finally
            {
                p.IsOpen = false;
            }
        }