I'm using xamarin forms signaturepad (a drawing pad). https://github.com/xamarin/SignaturePad/tree/master/samples
I'm editing it myself for custom functionality.
I'm trying to implement an "undo" button that removes that last stroke. I have added an Undo() function into SignaturePadCanvasView. But I don't know how to call that function.
i.e. If my xaml page looks like this
<signaturePad:SignaturePadCanvasView
StrokeColor="{Binding StrokeColor, Mode=TwoWay}"
UndoCommand="{Binding ?????}"
/>
<Button Text="Undo" Command="{Binding UndoButtonCommand}"/>
<Button Text="Color" Command="{Binding ChangeColorCommand}"/>
The "Color" button is working. (ChangeColorCommand changes the "StrokeColor" property in the ViewModel).
How do I get the "Undo" button to work?