void ContinueDrawingStroke(object sender, EventArgs e) { Point pos = PART_Cursor.GetPosition(PART_LoadedImageDisplay); Point prev = PART_Cursor.GetPreviousPosition(PART_LoadedImageDisplay); Draw(prev, pos, _pastCursorPosition); _pastCursorPosition = prev; }
/// <summary> /// Call to hide the UI and begin painting on the canvas /// </summary> public void StartPainting() { if (_isTutorialActive) { return; } // Make the cursor passive so buttons and stuff don't respond to it PART_Cursor.Passive = true; // Draw at the current position and start checking for updates until done Point pos = PART_Cursor.GetPosition(PART_LoadedImageDisplay); Draw(pos, pos, null); _pastCursorPosition = pos; if (sensor == null) { CompositionTarget.Rendering += ContinueDrawingStroke; } else { sensor.SkeletonFrameReady += ContinueDrawingStroke; } }