Working with the InkCanvas control using the Universal Windows Platform (UWP) I can't seem to determine the correct method to erase ink strokes when using the InkCanvas - there's an event "StrokeErased" that can be handled.
Ideally the "InkCanvasEditingMode" on "InkCanvas.EditingMode" value to be set to either "InkCanvasEditingMode.EraseByPoint" or "InkCanvasEditingMode.EraseByStroke" would be used but these aren't available in the InkCanvas under Windows 10.
The example https://github.com/Microsoft/Windows-universal-samples/tree/master/simpleink mentions "Erase ink strokes" but the example just handles the StrokeErased event with no actual support for the erasing of them that I can see, what am I missing?
To let the user erase strokes (similar to WPF's InkCanvasEditingMode) set the InkCanvas's InkPresenter's InputProcessingConfiguration.Mode to InkInputProcessingMode.Erasing .
canvas.InkPresenter.InputProcessingConfiguration.Mode = Windows.UI.Input.Inking.InkInputProcessingMode.Erasing;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With