Search code examples
c#uwpwin2d

InkCanvas dynamic rendering of strokes


In a UWP desktop app, I would like to use pen input to make simple brush strokes. I would like to render them as the pen moves to look like paint (so the InkCanvas's custom drying can't be done after the stroke is completed in OnStrokesCollected).

Can this type of dynamic custom drying be done with InkCanvas/InkPresenter?


Solution

  • You can use the CoreWetStrokeUpdateSource object to handle events to modify the ink as it's being drawing before it's rendered by the InkCanvas. Depending on what you mean by "simple brush strokes" you can achieve some interesting effects.