using System.Windows.Input; Point mousePos = Mouse.GetPosition(null); double mouseX = mousePos.X; double mouseY = mousePos.Y;
using System.Windows.Input.Touch; TouchPoint touchPoint = TouchDevice.GetTouchPoint(null); double touchX = touchPoint.Position.X; double touchY = touchPoint.Position.Y;This example retrieves the current touch point coordinates relative to the top-left corner of the screen. The TouchDevice class is part of the PresentationCore library. In conclusion, the GetCurrentPoint method is part of the Windows API and can be used in C# applications through relevant libraries such as PresentationCore.