{"id":10611,"date":"2014-05-01T05:00:52","date_gmt":"2014-05-01T09:00:52","guid":{"rendered":"http:\/\/blog.xamarin.com\/?p=10611"},"modified":"2014-05-01T05:00:52","modified_gmt":"2014-05-01T09:00:52","slug":"please-sign-here-open-source-signature-component","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/please-sign-here-open-source-signature-component\/","title":{"rendered":"Please Sign Here: Open Source Signature Component"},"content":{"rendered":"<p>\t\t\t\tFrom legal documents to completed field service and sales orders, the ability to capture a signature on a mobile device modernizes old world, paper-based transactions. However, it can be quite a bit of work to develop signature functionality for one platform, let alone to make it work across multiple platforms. To that end, we are pleased to announce the availability of our open source, cross-platform\u00a0<a href=\"http:\/\/components.xamarin.com\/view\/signature-pad\" title=\"signature pad component\" target=\"_blank\">Signature Pad component<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-10622\" src=\"\/wp-content\/uploads\/sites\/44\/2019\/04\/signatures.png\" alt=\"cross platform signatures\" width=\"544\" height=\"391\" \/><\/p>\n<p>Signature Pad is a modern component that makes the task of capturing a signature incredibly easy. It allows you to capture a touch-based signature with this simple code:<\/p>\n<pre class=\"lang:csharp decode:true\">\nvar signature = new SignaturePadView (View.Frame);\nView.AddSubview (signature);\n<\/pre>\n<p>That&#8217;s all it takes to produce the following screenshot:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-10614\" src=\"\/wp-content\/uploads\/sites\/44\/2019\/04\/signature1.png\" alt=\"basic signature\" width=\"541\" height=\"260\" \/><\/p>\n<p>Signature Pad can also be easily customized. It includes support for modifying attributes such as:<\/p>\n<ul>\n<li>Stroke color and thickness<\/li>\n<li>Background images for watermarks<\/li>\n<li>Background color<\/li>\n<li>Signature line adornments<\/li>\n<\/ul>\n<p>For example, the following code changes several of these attributes:<\/p>\n<pre class=\"lang:csharp decode:true\">\nvar signature = new SignaturePadView (View.Frame) {\n  StrokeWidth = 3f,\n  StrokeColor = UIColor.Green,\n  SignatureLineColor = UIColor.Yellow,\n  BackgroundColor = UIColor.Black\n};\nsignature.SignaturePrompt.Text = &quot;\u270d&quot;;\nsignature.SignaturePrompt.TextColor = UIColor.Yellow;\nsignature.Caption.TextColor = UIColor.White;\nsignature.Caption.Text = &quot;Please Sign Here&quot;;\n<\/pre>\n<p>This results in a more custom look, as shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-10616\" src=\"\/wp-content\/uploads\/sites\/44\/2019\/04\/signature2.png\" alt=\"custom signature\" width=\"541\" height=\"260\" \/><\/p>\n<p>Additionally, the signature pad has great support for retrieving an image representing the signature. Simply calling <strong>GetImage<\/strong> returns the platform specific image type:<\/p>\n<pre class=\"lang:csharp decode:true\">\n\/\/ iOS\nUIImage image = signature.GetImage ();\n\/\/ Android\nBitmap image = signature.GetImage ();\n\/\/ Windows Phone\nWriteableBitmap bitmap = signature.GetImage ();\n<\/pre>\n<p>You can get the code for\u00a0<a href=\"https:\/\/github.com\/xamarin\/SignaturePad\" title=\"Signature Pad code\" target=\"_blank\">Signature Pad from our Github repo<\/a>. We&#8217;re happy to make this available to the community and look forward to seeing what you do with it.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From legal documents to completed field service and sales orders, the ability to capture a signature on a mobile device modernizes old world, paper-based transactions. However, it can be quite a bit of work to develop signature functionality for one platform, let alone to make it work across multiple platforms. To that end, we are [&hellip;]<\/p>\n","protected":false},"author":546,"featured_media":39167,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[4],"class_list":["post-10611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","tag-xamarin-platform"],"acf":[],"blog_post_summary":"<p>From legal documents to completed field service and sales orders, the ability to capture a signature on a mobile device modernizes old world, paper-based transactions. However, it can be quite a bit of work to develop signature functionality for one platform, let alone to make it work across multiple platforms. To that end, we are [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/10611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/546"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=10611"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/10611\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/39167"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=10611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=10611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=10611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}