CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.89k stars 1.38k forks source link

[Feature Request] Delete Ink by point InkToolbar #2553

Closed gsantopaolo closed 3 years ago

gsantopaolo commented 6 years ago

I'm submitting a.Feature request (UserVoice request: ) -->

Have you experienced the stroke deletion using the standard InkCanvas/InkTollbar against the ink deletion experience on the Sketchpad app? The Sketchpad app gives user a more natural way of deleting strokes because it allows you to delete ink by single point, like an eraser on the real life. image

At the moment the UWP APIs does not expose such a way of erasing strokes, you can only erase the whole stroke, and in order to achieve the ink deletion by point there is a lot of code to write as well as having the appropriate know how.

What do you think of an extended toolbar where you can have the sake Sketchpad app without writing one single line of code.

Here you can find the link to the User voice

kbrons commented 6 years ago

Hi @gsantopaolo, let me know if I get this right. The idea would be to add this stroke erasing capability to the InkToolbar, or create an alternative/replacement for it using the Sketchpad app functionality?

gsantopaolo commented 6 years ago

@kbrons an inktoolbar extended control with delete by point functionality All the code for the ink deletion by point is ready i need/we need to figure out what it means to implement it as a control extension

shweaver-MSFT commented 6 years ago

I have some code for this, but it needs to be formalized into a more usable form.

You can find it here: InkToolbarAndCustomDryInk

I've been meaning to distill it but haven't found the time. Anyone is welcome to grab the code and play with it. As a note, it is not 100%, but works fairly well. I have some guidance from the MS ink team on what the correct implementation would look like. I'll add it to the readme.

gsantopaolo commented 6 years ago

Hi @shweaver-MSFT It seems the world is very small!!! :) I believe you forked one of my sample when I asked help to Cherry Wang to get a solution to the delete by point thing image Your repo is the fork of one of my company :) That's very nice. And yes, what I want to do is to split it in several incremental projects so that out of that it will be simpler to extract some articles and also figure out how to create a simple control for devs to use.

For incremental projects I mean something like first project only delete by point, second project including all code from the first one add the lasso selection and moving selected strokes, third project including all code from the the second one adding the resizing selected stroke functionality. Fourth project , including all code from the third one, copy paste of selected strokes and undo redo. So to summarize functionalities to work on:

shweaver-MSFT commented 6 years ago

@gsantopaolo, that's right! These would be really great features/samples to have for custom inking. Hopefully someone can pick this up :)

gsantopaolo commented 6 years ago

@shweaver-MSFT working on decoupling it, then we need to check if it's possible to create a control out of it as per subject

azchohfi commented 5 years ago

I love this. Any performance concerns? How would this be added? It should be a InkToolbarButton, but how should be add it to the InkToolbar? An extension method?

gsantopaolo commented 5 years ago

@azchohfi no problem about performance. How to add it that's what we have to figure out. I think we need to extend the InkCanvas (we can also expose all of it's props) cause we need to add a canvas to handle all the dry strokes. Also we need one ore more (delete by point, but also lasso etc) InkToolBarButton.

Kyaa-dost commented 4 years ago

@gsantopaolo what's the status on this?

Kyaa-dost commented 3 years ago

Going to close this for now due to the lack of progress towards this feature.