question

FeiXue-MSFT avatar image
FeiXue-MSFT asked ·

Detect if user has finished drawing strokes in InkCanvas

I am using VS2017 to develop my UWP app and my APP min target version is 10.14393.

Is there any event of InkCanvas I can use to detect whether user has finished drawing strokes or not.
I want to enable some button after user has drew strokes.

I tried the PointerReleased and PointerExit events, it seems not work.

Thanks.

windows-uwpwindows-uwp-runtime
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RoyLi-MSFT avatar image
RoyLi-MSFT answered ·

Hello,

Welcome to our Microsoft Q&A platform!

Unfortunately, the InkCanvas has no useful events for you to use in your scenario, but the InkPresenter does. So in order to implement your requirement, please register those two stroke events: StrokesCollected and StrokeStarted, then you could start and stop a DispatcherTimer to figure out whether your user has stopped drawing or not.

For more information and samples, please check the 'Dynamic recognition' section on this official document: Recognize Windows Ink strokes as text and shapes.

Thanks.


Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.