Pen and Ink

Sign in to queue

The Discussion

  • User profile image

    Great video.  Is there a way to erase by point, rather than stroke, in a C# UWP app or does this have to be done using DirectInk?

  • User profile image


    Great question! I'm not 100% sure on whether there's a better way of doing this as ink shows up in the StrokeContainer as a collection of InkStroke objects which can then be manipulated (e.g. deleted).

    However, it is possible to get hold of the points that make up an InkStroke (via the GetInkPoints() method) but it gives you a read-only view.

    That said, it's then possible to manually build InkStroke objects using the InkStrokeBuilder class so I'd say it's possible to;

    1. Select the stroke that contains the points you don't want.
    2. Delete it.
    3. Get the points from it.
    4. Build a new stroke containing only the points that you want.
    5. Add that new stroke back into the StrokeContainer.

    That's perhaps one way of achieving what you want here, there may be a better way that I haven't yet come across.



  • User profile image


    Does Microsoft Word currently use the DirectInk platform?



Add Your 2 Cents