Hello,
Welcome to Microsoft Q&A!
- Define a new public variable
ID
insideTouchPoint
class . - Assign the value when initializing in
BezierCurvePage.cs
. for (int i = 0; i < 4; i++)
{
TouchPoint touchPoint = new TouchPoint
{
Center = new SKPoint(100 + 200 * (i % 2),100 + 200 * i),
ID = i
};
touchPoints[i] = touchPoint
} - Detect which point is dragged in method
ProcessTouchEvent
inTouchPoint
class case TouchActionType.Moved:
if (isBeingDragged && touchId == id)
{
Console.WriteLine("ID=" + ID); //here you can get which is dragged
break;Center += location - previousPoint; previousPoint = location; centerMoved = true; }
Thank you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.