In UWP I am using an InkCanvas
to detect strokes. I would like to change the color of the current Stroke
.
I tried a couple of events but I'm only able to change the color of the Stroke
after it has been collected through the following event:
InkCanvas.InkPresenter.StrokesCollected += InkPresenter_StrokesCollected
private void InkPresenter_StrokesCollected(InkPresenter sender, InkStrokesCollectedEventArgs args)
{
foreach (InkStroke stroke in InkCanvas.InkPresenter.StrokeContainer.GetStrokes())
{
InkDrawingAttributes drawingAttributes = new InkDrawingAttributes();
drawingAttributes.Color = Windows.UI.Colors.Blue;
stroke.DrawingAttributes = drawingAttributes;
}
}
I also tried the events on StrokeInput
but I'm unable to find the current Stroke this way.