We all have gone through the experience of someone asking for our signature or while working on a project that demands or requires somehow a signature… So.. I was thinking about how can I do this in Xamarin Forms and I found it!? Let’s See!
What about this Xamarin.Controls.SignaturePad.Forms?
With this plugin you can create , save (In Jpeg, Jpg and Png formats) and re-create by means of points a signature we’ve wrote in the past. This plugin, beside of Xamarin Forms Application , is available for native applications.
First of all.. What do I need?
- Add from NuGet Package the plugin: Xamarin.Controls.SignaturePad.Forms:
Let’s Start!
You must add the following namespace on your xaml page:
After this, you have to add the tag that I show you bellow for the signature control:
This is the result:
Attributes of the SignaturePadView control:
✔ X:Name: Set the name of the control.
Visual attributes:
Here an example:
Saving the signature image
You must use using SignaturePad.Forms;
Getting the points required to build the signature and load it on the screen
This format is important if you want to recreate a signature on your screen. You can get the signature by an array of points. You can access it as follows:
And.. How can I load it…?
Good luck with your implementation! ?
Spanish post:
https://medium.com/@reyes.leomaris/agregando-firmas-en-xamarin-forms-7b34dafe9e7f
References:
https://github.com/xamarin/SignaturePad
thank you
You are welcome :)!