In WPF, you could override the OnDraw to create a custom geometry to render as the 'wet' ink, although it increases latency quite a bit since you're not using the geometry provided and already calculated. I'm wondering if it is possible to achieve something similar in UWP. Suppose I wanted my pen to stroke to be jagged and zig-zagy. The 'dry' ink would be simple to implement with custom drying and all, but is there any way for my 'wet' ink to achieve this effect as well?
Asked
Active
Viewed 481 times
1 Answers
0
Win2D has capabilities to render ink, you could use CanvasControl to render ink strokes with InkCanvas.
The CanvasControl
has a Draw
event, you could collect the 'wet' ink strokes and render it in this event.
There’s an official Win2D sample called ‘InkExample’, if you want, you could check it.

Xie Steven
- 8,544
- 1
- 9
- 23
-
I am aware of the CoreWetStrokeUpdateSource class, but it does not achieve my goal. You can modify the new InkPoints in the Continuing handler, but you won't be able to render it yourself. Our application syncs strokes between windows pc, android, and ios devices So we create the geometry and render it ourselves to ensure they look the same on these devices. – Chen Huang Nov 21 '18 at 07:40
-
I'm looking for the same thing I found this on their documentation https://learn.microsoft.com/en-us/windows/uwp/design/input/pen-and-stylus-interactions but I don't know if it's compatible with UWP did you manage to find the answer for your quetion it will help me if you post it here ? I want to make a drawing app for windows on arm – Nicu Dec 18 '19 at 07:48
-
This is not what the author has asked. The question was about how to render the ink as its drawn on the screen, not after the pen has been lifted (which is possible with Win2D). Currently this doesn't seem to be possible. – reckless May 09 '20 at 11:00