Fixes #453 ink strokes not captured until stylus up #540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #453 by using reflection to get a frozen copy of DrawingGroups from the inking thread's real-time visual. Under normal use cases, it seems strokes are transitioned from the inking thread to the UI thread's InkCanvas when completed (e.g. stylus up). However, in our sort of unique case of animating the drawing process, we do want to see the real-time visual incrementally, so this fix pulls over the partial stroke as DrawingGroups into an image overlay that is Z-ordered above the InkCanvas. This extra partial-stroke-copy logic is only performed when a capture is desired (via thetimer), and the inking overlay is emptied when no partial stroke is alive.