recordsmor.blogg.se

How to redo in windows
How to redo in windows





how to redo in windows

Additionally, a peekoperation may give access to the top without modifying the stack.īecause of it's LIFO feature, we can push() the last stroke into the stack when undo the ink, and pop() will return the last undone stroke. The order in which elements come off a stack gives rise to its alternative name, LIFO (for last in, first out). In computer science, a stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. Let's review the basics of the Stack fist:

how to redo in windows

That is, by using a Stack to store the deleted stroke. The most easy way is to make use of the data structure knowedlege we learned in college. Then we can achieve the undo functionality like this: public void UndoLastStorke() To get all the storkes on canvas: IReadOnlyList strokes = () To undo a stroke, is to delete a stroke on the canvas, the API is: ()įo redo, it is actually re-write a stroke on the canvas, API is: () Today, I have successfully done it, and I'd like to share with you.įirst, you need to add two custom buttons on the InkToolbar for Undo / Redo Official document covered Undo functionalilty, but not redo. To implement this, we will need to code for ourselves. The InkCanvas in UWP only got pens by default, it can not perform Undo or Redo.







How to redo in windows