The All New Xamarin.Forms Signature Pad Control Is Here! | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (174).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (215)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (915)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (147)Chart  (131)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (628)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (507)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (592)What's new  (332)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
The All New Xamarin.Forms Signature Pad Control Is Here!

The All New Xamarin.Forms Signature Pad Control Is Here!

Nowadays, many mobile apps need a user interface that allows users to capture, save, and export signatures. We at Syncfusion understand the requirement for this simple, but essential control and now we are happy to deliver the unique Xamarin.Forms Signature Pad control. This control is available with our Essential Studio for Xamarin.Forms 2020 Volume 2 release.

In this blog post, we will summarize the key features of this Xamarin.Forms Signature Pad control. This control is also available for Xamarin.Android and Xamarin.iOS platforms.
Xamarin.Forms Signature Pad Control

Let’s have a look at them!

Feels like a real pen

The Xamarin.Forms Signature Pad control displays a signature path that varies based on the writing speed, which provides users the feel of a real pen.

In the following image, the left one was captured using a normal signature editor, but the right one was captured using our Syncfusion Signature Pad control. Here, you can see that the stroke path varies based on the user’s writing acceleration.

Difference between Normal Signature Editor and Xamarin Signature Pad control
Difference between Normal Signature Editor and Syncfusion Signature Pad control

Stroke customization

The Signature Pad control allows you to customize the stroke width and color of your signature like in the following image.

Xamarin.Forms Signature Pad control with custom stroke color
Xamarin.Forms Signature Pad control with custom stroke color

Capture and save signature in a PDF file using PDF Viewer

The following steps will help you add the Signature Pad control to your application, record the signature, and add it to a PDF document using the PDF Viewer control.

Step 1: The Syncfusion Xamarin component libraries are available in nuget.org. To add SfSignaturePad to your project, open the NuGet package manager in Visual Studio, search for Syncfusion.Xamarin.SfSignaturePad, and then install it.

Step 2: Now, let’s add the SfPdfViewer reference from nuget.org. To add the PDF Viewer to your project, open the NuGet package manager in Visual Studio, search for Syncfusion.Xamarin.SfPdfViewer, and then install it.

Step 3: The Signature Pad control and PDF Viewer can be configured entirely in C# or in XAML. Here, we are going to add these controls in XAML. Then, add the namespaces in the XAML file as shown in the following code example.

xmlns:sfsignaturepad="clr-namespace:Syncfusion.XForms.SignaturePad;assembly=Syncfusion.Xamarin.SfSignaturePad

xmlns:sfpdfviewer="clr-namespace:Syncfusion.SfPdfViewer.XForms;assembly=Syncfusion.SfPdfViewer.XForms"

Step 4: Create instances for SfSignaturePad and SfPdfViewer.

<sfsignaturepad:SfSignaturePad />
<sfpdfviewer:SfPdfViewer/>

Step 5: I am going to place the PDF Viewer control on top to display the PDF document and the signature UI with a button placed at the bottom. To achieve this, I am going to use the DataGrid control.

Refer to the following code example.

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="200"/>

<RowDefinition Height="50"/>
</Grid.RowDefinitions>
 
<sfpdfviewer:SfPdfViewer x:Name="sfPdfViewer"/>
<sfsignaturepad:SfSignaturePad x:Name="sfSignaturePad" Grid.Row="1" />
<button Grid.Row="2" Text="Save" Clicked="Save_Clicked"/>
</Grid>

Step 6: The Save method of the Signature Pad control captures the strokes in the control and saves them to the ImageSource property.

So, in a button click event, call the Save method and get the image from the ImageSource property of the SfSignaturePad. Use the AddStamp method of the PDF Viewer instance to place the signature on the PDF document.

Refer to the following code example.

private void Save_Clicked(object sender, EventArgs e)
{
sfSignaturePad.Save();
sfPdfViewer.AddStamp(sfSignaturePad.ImageSource, 1, new Point(250, 850));
}

PDF document with signature captured using Xamarin.Forms Signature Pad
PDF document with signature captured using Xamarin.Forms Signature Pad

Conclusion

In this blog post, we have walked you through the  Syncfusion Xamarin.Forms Signature Pad control available in the 2020 Volume 2 release. With this control, you can easily add a signature pad UI to your application.

You can always download our free evaluation to see all our controls in action. Explore our samples available on Google Play and the Microsoft Store. Learn about the controls’ advanced features in our documentation.

If you have any questions about these controls, please let us know in the comments below. You can also contact us through our support forumDirect-Trac, or feedback portal. We are always happy to assist you!

If you enjoyed this blog, we think you will also like:

[Blog] 4 New Features You Must Try in Xamarin.Forms 4.5

[Blog] Sneak Peek at 2020 Volume 2: Xamarin.Forms

[Blog] Here are the World’s First and Only UI Controls for Xamarin.Forms WPF

[Blog] 5 Different Ways To Visualize A Color Picker Control in Xamarin.Forms

[Ebook] Xamarin.Forms Succinctly

Tags:

Share this post:

Comments (4)

I am trying to evaluate your signature control. I am using the non registered version. I am using the latest Visual Studio 2019, with the latest Xamarin Forms and Xamarin Essentials. On both UWP and iOS 14 the signature pad doesn’t capture any points and the Save button is not visible. I didn’t see any other options to turn on drawing.

My background color is grey and the stroke color is yellow.

Should SfSignaturePad show points with a mouse down in UWP or a mouse down in the iOS simulator?
Do I need to use a certain version of Xamarin Forms with SfSignaturePad?

Selva Ganapathy Kathiresan
Selva Ganapathy Kathiresan

Hi BRAND BOGARD,

Thank you for evaluating our SignaturePad Control.

Currently Xamarin.Forms SignaturePad supports only in Android and iOS platform, we didn’t extend our support in UWP. you can find our controls cross-platform support here
https://help.syncfusion.com/xamarin/introduction/xamarin-cross-platform-ui

regarding iOS, Can you please confirm did you initialize the renderer as below?
https://help.syncfusion.com/xamarin/signaturepad/getting-started#ios

Regards,
Selva Ganapathy K

Could You please tell me that, is there a way to set already existing image(signature) to sfsignaturepad….

Selva Ganapathy Kathiresan
Selva Ganapathy Kathiresan

Hi Heshani,

Currently, we don’t have the option to load the existing image to SfSignaturePad. Can you try our SfImageEditor? Hope this component may help to achieve your requirement.

https://www.syncfusion.com/xamarin-ui-controls/xamarin-image-editor
https://help.syncfusion.com/xamarin/image-editor/getting-started

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed