[
  {
    "path": ".editorconfig",
    "content": "# EditorConfig is awesome: http://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n# Don't use tabs for indentation.\n[*]\nindent_style = space\n# (Please don't specify an indent_size here; that has too many unintended consequences.)\n\n# Code files\n[*.{cs,csx,vb,vbx}]\nindent_style = tab\nindent_size = 4\ninsert_final_newline = true\ncharset = utf-8-bom\ntrim_trailing_whitespace = true\n\n# Xml project files\n[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]\nindent_size = 2\n\n# Xml config files\n[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]\nindent_size = 2\n\n# JSON files\n[*.json]\nindent_size = 2\n\n# .NET code style settings:\n[*.{cs,vb}]\n# Sort using and Import directives with System.* appearing first\ndotnet_sort_system_directives_first = true\n\n# Avoid \"this.\" and \"Me.\" if not necessary\ndotnet_style_qualification_for_field = false:suggestion\ndotnet_style_qualification_for_property = false:suggestion\ndotnet_style_qualification_for_method = false:suggestion\ndotnet_style_qualification_for_event = false:suggestion\n\n# Use language keywords instead of framework type names for type references\ndotnet_style_predefined_type_for_locals_parameters_members = true:suggestion\ndotnet_style_predefined_type_for_member_access = true:suggestion\n\n# Modifier preferences\ndotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion\n\n# Expression-level preferences\ndotnet_style_object_initializer = true:suggestion\ndotnet_style_collection_initializer = true:suggestion\ndotnet_style_explicit_tuple_names = true:suggestion\ndotnet_style_prefer_inferred_tuple_names = true:suggestion\ndotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion\n\n# Null-checking preferences\ndotnet_style_coalesce_expression = true:suggestion\ndotnet_style_null_propagation = true:suggestion\n\n# C# code style settings:\n[*.cs]\n# Modifier preferences\ncsharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async\n\n# Prefer \"var\" everywhere\ncsharp_style_var_for_built_in_types = true:suggestion\ncsharp_style_var_when_type_is_apparent = true:suggestion\ncsharp_style_var_elsewhere = true:suggestion\n\n# Prefer method-like constructs to have a block body\ncsharp_style_expression_bodied_methods = false:suggestion\ncsharp_style_expression_bodied_constructors = false:suggestion\ncsharp_style_expression_bodied_operators = false:suggestion\n\n# Prefer property-like constructs to have an expression-body\ncsharp_style_expression_bodied_properties = true:suggestion\ncsharp_style_expression_bodied_indexers = true:suggestion\ncsharp_style_expression_bodied_accessors = true:suggestion\n\n# Pattern matching\ncsharp_style_pattern_matching_over_is_with_cast_check = true:suggestion\ncsharp_style_pattern_matching_over_as_with_null_check = true:suggestion\n\n# Inlined variable declarations\ncsharp_style_inlined_variable_declaration = true:suggestion\n\n# Expression-level preferences\ncsharp_prefer_simple_default_expression = true:suggestion\ncsharp_style_deconstructed_variable_declaration = true:suggestion\ncsharp_style_pattern_local_over_anonymous_function = true:suggestion\n\n# \"Null\" checking preferences\ncsharp_style_throw_expression = true:suggestion\ncsharp_style_conditional_delegate_call = true:suggestion\n\n# Code block preferences\ncsharp_prefer_braces = true:suggestion\n\n# Newline settings\ncsharp_new_line_before_open_brace = all\ncsharp_new_line_before_else = true\ncsharp_new_line_before_catch = true\ncsharp_new_line_before_finally = true\ncsharp_new_line_before_members_in_object_initializers = true\ncsharp_new_line_before_members_in_anonymous_types = true\ncsharp_new_line_between_query_expression_clauses = true\n\n# Indentation options\ncsharp_indent_block_contents = true\ncsharp_indent_braces = false\ncsharp_indent_case_contents = true\ncsharp_indent_switch_labels = true\ncsharp_indent_labels = one_less_than_current\n\n# Spacing options\ncsharp_space_after_cast = false\ncsharp_space_after_colon_in_inheritance_clause = true\ncsharp_space_after_comma = true\ncsharp_space_after_dot = false\ncsharp_space_after_keywords_in_control_flow_statements = true\ncsharp_space_after_semicolon_in_for_statement = true\ncsharp_space_around_binary_operators = before_and_after\ncsharp_space_around_declaration_statements = do_not_ignore\ncsharp_space_before_colon_in_inheritance_clause = true\ncsharp_space_before_comma = false\ncsharp_space_before_dot = false\ncsharp_space_before_open_square_brackets = false\ncsharp_space_before_semicolon_in_for_statement = false\ncsharp_space_between_empty_square_brackets = false\ncsharp_space_between_method_call_empty_parameter_list_parentheses = false\ncsharp_space_between_method_call_name_and_opening_parenthesis = true\ncsharp_space_between_method_call_parameter_list_parentheses = false\ncsharp_space_between_method_declaration_empty_parameter_list_parentheses = false\ncsharp_space_between_method_declaration_name_and_open_parenthesis = true\ncsharp_space_between_method_declaration_parameter_list_parentheses = false\ncsharp_space_between_parentheses = false\ncsharp_space_between_square_brackets = false\n\n# Wrapping options\ncsharp_preserve_single_line_statements = false\ncsharp_preserve_single_line_blocks = true\n\n# C# naming rules:\n[*.cs]\n\n# symbols\n\n# const fields\ndotnet_naming_symbols.constant_fields.required_modifiers = const\ndotnet_naming_symbols.constant_fields.applicable_kinds = field\n# methods|properties\ndotnet_naming_symbols.methods_and_properties.applicable_kinds = delegate,event,enum,interface,struct,class,method,property\n# parameters|fields\ndotnet_naming_symbols.parameters_and_fields.applicable_kinds = field,parameter\n# private|internal fields\ndotnet_naming_symbols.private_internal_fields.applicable_kinds = field\ndotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private,internal\n\n# rules\n\n# name all constant fields using PascalCase\ndotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion\ndotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields\ndotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case\n\n# name all methods and properties using PascalCase\ndotnet_naming_rule.methods_and_properties_should_be_pascal_case.severity = suggestion\ndotnet_naming_rule.methods_and_properties_should_be_pascal_case.symbols = methods_and_properties\ndotnet_naming_rule.methods_and_properties_should_be_pascal_case.style = pascal_case\n\n# name all parameters and fields using camelCase\ndotnet_naming_rule.parameters_should_be_pascal_case.severity = suggestion\ndotnet_naming_rule.parameters_should_be_pascal_case.symbols = parameters_and_fields\ndotnet_naming_rule.parameters_should_be_pascal_case.style = camel_case\n\n# internal and private fields should be camelCase\ndotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion\ndotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields\ndotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case\n"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# Repo-specific files\ntools/\noutput/\n**/Resources/Resource.Designer.cs\ncomponent/*.xam\n\n# User-specific files\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\nbld/\n[Bb]in/\n[Oo]bj/\n[Ll]og/\n\n# Visual Studio 2015 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# DNX\nproject.lock.json\nartifacts/\n\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n*.VC.db\n*.VC.VC.opendb\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding add-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# TODO: Comment the next line if you want to checkin your web deploy settings\n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n\n# Microsoft Azure Web App publish settings. Comment the next line if you want to\n# checkin your Azure Web App publish settings, but sensitive information contained\n# in these scripts will be unencrypted\nPublishScripts/\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/packages/*\n# except build/, which is used as an MSBuild target.\n!**/packages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/packages/repositories.config\n# NuGet v3's project.json files produces more ignoreable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Windows Store app package directories and files\nAppPackages/\nBundleArtifacts/\nPackage.StoreAssociation.xml\n_pkginfo.txt\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n\n# Others\nClientBin/\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.publishsettings\nnode_modules/\norleans.codegen.cs\n\n# Since there are multiple workflows, uncomment next line to ignore bower_components\n# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)\n#bower_components/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n\n# SQL Server files\n*.mdf\n*.ldf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# Paket dependency manager\n.paket/paket.exe\npaket-files/\n\n# FAKE - F# Make\n.fake/\n\n# JetBrains Rider\n.idea/\n*.sln.iml"
  },
  {
    "path": "ISSUE_TEMPLATE.md",
    "content": "### Description\n\n<!-- a general description goes here -->\n\n### Code\n\n<!-- a snippet of code that demonstrates the issue -->\n\n### Expected Behavior\n\n<!-- a general description of what was the expected behavior or result -->\n\n### Actual Behavior\n\n<!-- a general description of what really happened -->\n\n### Basic Information\n\n- Version with issue:  <!-- the version of SkiaSharp that has the issue -->\n- Last known good version:  <!-- the version of SkiaSharp that still working -->\n- IDE:  <!-- Visual Studio / Visual Studio for Mac / MonoDevelop / Visual Studio Code -->\n- Platform Target Frameworks: <!-- all that apply, remove the platforms that aren't broken or haven't had any testing -->\n  - Android: <!-- the version of the Android SDK you are compiling against, e.g. 7.1 --> \n  - iOS:  <!-- the version of the iOS SDK you are compiling against, e.g. 11.1 -->\n  - UWP:  <!-- the version of the UWP SDK you are compiling against, e.g. 16299 --> \n  - Xamarin.Forms:  <!-- the version of Xamarin.Forms you are building for, e.g. 2.5.0.280555 -->\n- Target Devices:\n  -   <!-- the devices that you noticed this on, e.g. iPhone X -->\n\n### Screenshots\n\n<!-- if the issue is a visual issue, please include screenshots showing the problem if possible -->\n\n### Reproduction Link\n\n<!-- please upload or provide a link to a reproduction case -->\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2017 Xamarin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# Signature Pad\n\n\n[![Build Status](https://jenkins.mono-project.com/buildStatus/icon?job=Components-SignaturePad-Windows)](https://jenkins.mono-project.com/view/Components/job/Components-SignaturePad-Windows/)  [![Build Status](https://jenkins.mono-project.com/buildStatus/icon?job=Components-SignaturePad)](https://jenkins.mono-project.com/view/Components/job/Components-SignaturePad/)\n\n[![SignaturePad NuGet](https://img.shields.io/nuget/vpre/Xamarin.Controls.SignaturePad.svg?label=SignaturePad%20NuGet)](https://www.nuget.org/packages/Xamarin.Controls.SignaturePad)  [![SignaturePad Xamairn.Forms NuGet](https://img.shields.io/nuget/vpre/Xamarin.Controls.SignaturePad.Forms.svg?label=SignaturePad.Forms%20NuGet)](https://www.nuget.org/packages/Xamarin.Controls.SignaturePad.Forms)\n\nSignature Pad makes capturing, saving, exporting, and displaying signatures extremely simple on\nXamarin.iOS, Xamarin.Android and Windows.\n\nNot only is Signature Pad available for native apps, but also available in Xamarin.Forms apps.\n\n![Screenshot](images/signature-ios.jpg)\n\n---\n\n## Using Signature Pad\n\nSignature Pad can be installed from [NuGet.org][nuget-link] for native Xamarin and Windows apps:\n\n```\nnuget install Xamarin.Controls.SignaturePad\n```\n\nAnd also for Xamarin.Forms apps:\n\n```\nnuget install Xamarin.Controls.SignaturePad.Forms\n```\n\n### Using Signature Pad on iOS\n\n```csharp\nusing Xamarin.Controls;\n\nvar signatureView = new SignaturePadView (View.Frame) {\n\tStrokeWidth = 3f,\n\tStrokeColor = UIColor.Black,\n\tBackgroundColor = UIColor.White,\n};\n```\n\n### Using Signature Pad on Android\n\n```csharp\nusing Xamarin.Controls;\n\nvar signatureView = new SignaturePadView (this) {\n\tStrokeWidth = 3f,\n\tStrokeColor = Color.White,\n\tBackgroundColor = Color.Black\n};\n```\n\n### Using Signature Pad on Windows\n\n```xml\n<!-- xmlns:controls=\"using:Xamarin.Controls\" -->\n\n<controls:SignaturePad\n\tx:Name=\"signatureView\"\n\tStrokeWidth=\"3\"\n\tStrokeColor=\"White\"\n\tBackground=\"Black\" />\n```\n\n### Using Signature Pad on Xamarin.Forms\n\n```xml\n<!-- xmlns:controls=\"clr-namespace:SignaturePad.Forms;assembly=SignaturePad.Forms\" -->\n\n<controls:SignaturePadView\n\tx:Name=\"signatureView\"\n\tStrokeWidth=\"3\"\n\tStrokeColor=\"BlackWhite\"\n\tBackgroundColor=\"Black\" />\n```\n\n### Obtaining a Signature Image\n\nThe signature that was drawn on the canvas can be obtained as a image using the `GetImage(...)`\nmethod overloads. The resulting image will be in the native platform image type:\n\n```csharp\n// iOS\nUIImage image = signatureView.GetImage ();\n\n// Android\nBitmap image = signatureView.GetImage ();\n\n// Windows\nWriteableBitmap bitmap = signatureView.GetImage ();\n```\n\nFor Xamarin.Forms, there is no \"native\" image format, but `GetImageStreamAsync` can be used instead\nto retrieve an encoded (jpeg or png) image stream:\n\n```csharp\nStream bitmap = await signatureView.GetImageStreamAsync (SignatureImageFormat.Png);\n```\n\n### Obtaining the Signature Points\n\nIn addition to retrieving the signature as an image, the signature can also be retrieved as\nas an array of points:\n\n```csharp\nvar strokes = signatureView.Strokes;\n```\n\nThese strokes can be used to save and restore a signature:\n\n```csharp\n// restore strokes (iOS, Android, Windows)\nsignatureView.LoadStrokes (newStrokes);\n\n// restore strokes (Xamarin.Forms)\nsignatureView.Strokes = newStrokes;\n```\n\n---\n\n## License\n\nThe license for this repository is specified in [LICENSE](LICENSE).\n\n\n## .NET Foundation\nThis project is part of the [.NET Foundation](http://www.dotnetfoundation.org/projects).\n\n[nuget-link]: https://www.nuget.org/packages/Xamarin.Controls.SignaturePad\n"
  },
  {
    "path": "build.cake",
    "content": "///////////////////////////////////////////////////////////////////////////////\n// ARGUMENTS\n///////////////////////////////////////////////////////////////////////////////\n\nvar CURRENT_PACKAGE_VERSION = \"3.0.0\";\n\nvar target = Argument(\"target\", \"Default\");\nvar configuration = Argument(\"configuration\", \"Release\");\nvar packageVersion = Argument(\"packageVersion\", CURRENT_PACKAGE_VERSION);\nvar majorVersion = $\"{packageVersion.Substring(0, packageVersion.IndexOf(\".\"))}.0.0.0\";\nvar buildVersion = Argument(\"buildVersion\", EnvironmentVariable(\"BUILD_NUMBER\") ?? \"\");\nif (!string.IsNullOrEmpty(buildVersion)) {\n    buildVersion = $\"-{buildVersion}\";\n}\n\n///////////////////////////////////////////////////////////////////////////////\n// TASKS\n///////////////////////////////////////////////////////////////////////////////\n\nTask(\"libs\")\n    .Does(() =>\n{\n    var sln = IsRunningOnWindows() ? \"./src/SignaturePad.sln\" : \"./src/SignaturePad.Mac.sln\";\n\n    MSBuild(sln, new MSBuildSettings {\n        Verbosity = Verbosity.Minimal,\n        Configuration = configuration,\n        PlatformTarget = PlatformTarget.MSIL,\n        MSBuildPlatform = MSBuildPlatform.x86,\n        ArgumentCustomization = args => args.Append(\"/restore\"),\n        Properties = {\n            { \"AssemblyVersion\", new [] { majorVersion } },\n            { \"Version\", new [] { packageVersion } },\n        },\n    });\n\n    EnsureDirectoryExists(\"./output/android/\");\n    EnsureDirectoryExists(\"./output/ios/\");\n    EnsureDirectoryExists(\"./output/uwp/\");\n    EnsureDirectoryExists(\"./output/uwp/Themes\");\n    EnsureDirectoryExists(\"./output/netstandard/\");\n\n    CopyFiles($\"./src/SignaturePad.Android/bin/{configuration}/SignaturePad.*\", \"./output/android/\");\n    CopyFiles($\"./src/SignaturePad.iOS/bin/{configuration}/SignaturePad.*\", \"./output/ios/\");\n    CopyFiles($\"./src/SignaturePad.UWP/bin/{configuration}/SignaturePad.*\", \"./output/uwp/\");\n    CopyFiles($\"./src/SignaturePad.UWP/bin/{configuration}/Themes/*\", \"./output/uwp/Themes\");\n\n    CopyFiles($\"./src/SignaturePad.Forms.Droid/bin/{configuration}/SignaturePad.Forms.*\", \"./output/android/\");\n    CopyFiles($\"./src/SignaturePad.Forms.iOS/bin/{configuration}/SignaturePad.Forms.*\", \"./output/ios/\");\n    CopyFiles($\"./src/SignaturePad.Forms.UWP/bin/{configuration}/SignaturePad.Forms.*\", \"./output/uwp/\");\n    CopyFiles($\"./src/SignaturePad.Forms.UWP/bin/{configuration}/Themes/*\", \"./output/uwp/Themes\");\n    CopyFiles($\"./src/SignaturePad.Forms/bin/{configuration}/SignaturePad.Forms.*\", \"./output/netstandard/\");\n});\n\nTask(\"nuget\")\n    .IsDependentOn(\"libs\")\n    .WithCriteria(IsRunningOnWindows())\n    .Does(() =>\n{\n    var nuget = Context.Tools.Resolve(\"nuget.exe\");\n    var nuspecs = GetFiles(\"./nuget/*.nuspec\");\n    var settings = new NuGetPackSettings {\n        BasePath = \".\",\n        OutputDirectory = \"./output\",\n        Properties = new Dictionary<string, string> {\n            { \"configuration\", configuration },\n            { \"version\", packageVersion },\n        },\n    };\n\n    EnsureDirectoryExists(\"./output\");\n\n    NuGetPack(nuspecs, settings);\n\n    settings.Properties[\"version\"] = $\"{packageVersion}-preview{buildVersion}\";\n    NuGetPack(nuspecs, settings);\n});\n\nTask(\"samples\")\n    .IsDependentOn(\"libs\")\n    .Does(() =>\n{\n    var settings = new MSBuildSettings {\n        Verbosity = Verbosity.Minimal,\n        Configuration = configuration,\n        PlatformTarget = PlatformTarget.MSIL,\n        MSBuildPlatform = MSBuildPlatform.x86,\n        ArgumentCustomization = args => args.Append(\"/restore\"),\n    };\n\n    if (IsRunningOnWindows()) {\n        MSBuild(\"./samples/Sample.Android/Sample.Android.sln\", settings);\n        MSBuild(\"./samples/Sample.iOS/Sample.iOS.sln\", settings);\n        MSBuild(\"./samples/Sample.UWP/Sample.UWP.sln\", settings);\n        MSBuild(\"./samples/Sample.Forms/Sample.Forms.sln\", settings);\n    } else {\n        MSBuild(\"./samples/Sample.Android/Sample.Android.sln\", settings);\n        MSBuild(\"./samples/Sample.iOS/Sample.iOS.sln\", settings);\n        MSBuild(\"./samples/Sample.Forms/Sample.Forms.Mac.sln\", settings);\n    }\n\n});\n\nTask(\"Default\")\n    .IsDependentOn(\"libs\")\n    .IsDependentOn(\"nuget\")\n    .IsDependentOn(\"samples\");\n\nTask(\"CI\")\n    .IsDependentOn(\"Default\");\n\nRunTarget(target);\n"
  },
  {
    "path": "build.ps1",
    "content": "##########################################################################\n# This is the Cake bootstrapper script for PowerShell.\n# This file was downloaded from https://github.com/cake-build/resources\n# Feel free to change this file to fit your needs.\n##########################################################################\n\n<#\n\n.SYNOPSIS\nThis is a Powershell script to bootstrap a Cake build.\n\n.DESCRIPTION\nThis Powershell script will download NuGet if missing, restore NuGet tools (including Cake)\nand execute your Cake build script with the parameters you provide.\n\n.PARAMETER Script\nThe build script to execute.\n.PARAMETER Target\nThe build script target to run.\n.PARAMETER Configuration\nThe build configuration to use.\n.PARAMETER Verbosity\nSpecifies the amount of information to be displayed.\n.PARAMETER ShowDescription\nShows description about tasks.\n.PARAMETER DryRun\nPerforms a dry run.\n.PARAMETER Experimental\nUses the nightly builds of the Roslyn script engine.\n.PARAMETER Mono\nUses the Mono Compiler rather than the Roslyn script engine.\n.PARAMETER SkipToolPackageRestore\nSkips restoring of packages.\n.PARAMETER ScriptArgs\nRemaining arguments are added here.\n\n.LINK\nhttps://cakebuild.net\n\n#>\n\n[CmdletBinding()]\nParam(\n    [string]$Script = \"build.cake\",\n    [string]$Target,\n    [string]$Configuration,\n    [ValidateSet(\"Quiet\", \"Minimal\", \"Normal\", \"Verbose\", \"Diagnostic\")]\n    [string]$Verbosity,\n    [switch]$ShowDescription,\n    [Alias(\"WhatIf\", \"Noop\")]\n    [switch]$DryRun,\n    [switch]$Experimental,\n    [switch]$Mono,\n    [switch]$SkipToolPackageRestore,\n    [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]\n    [string[]]$ScriptArgs\n)\n\n[Reflection.Assembly]::LoadWithPartialName(\"System.Security\") | Out-Null\nfunction MD5HashFile([string] $filePath)\n{\n    if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))\n    {\n        return $null\n    }\n\n    [System.IO.Stream] $file = $null;\n    [System.Security.Cryptography.MD5] $md5 = $null;\n    try\n    {\n        $md5 = [System.Security.Cryptography.MD5]::Create()\n        $file = [System.IO.File]::OpenRead($filePath)\n        return [System.BitConverter]::ToString($md5.ComputeHash($file))\n    }\n    finally\n    {\n        if ($file -ne $null)\n        {\n            $file.Dispose()\n        }\n    }\n}\n\nfunction GetProxyEnabledWebClient\n{\n    $wc = New-Object System.Net.WebClient\n    $proxy = [System.Net.WebRequest]::GetSystemWebProxy()\n    $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials        \n    $wc.Proxy = $proxy\n    return $wc\n}\n\nWrite-Host \"Preparing to run build script...\"\n\nif(!$PSScriptRoot){\n    $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent\n}\n\n$TOOLS_DIR = Join-Path $PSScriptRoot \"tools\"\n$ADDINS_DIR = Join-Path $TOOLS_DIR \"Addins\"\n$MODULES_DIR = Join-Path $TOOLS_DIR \"Modules\"\n$NUGET_EXE = Join-Path $TOOLS_DIR \"nuget.exe\"\n$CAKE_EXE = Join-Path $TOOLS_DIR \"Cake/Cake.exe\"\n$NUGET_URL = \"https://dist.nuget.org/win-x86-commandline/latest/nuget.exe\"\n$PACKAGES_CONFIG = Join-Path $TOOLS_DIR \"packages.config\"\n$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR \"packages.config.md5sum\"\n$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR \"packages.config\"\n$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR \"packages.config\"\n\n# Make sure tools folder exists\nif ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {\n    Write-Verbose -Message \"Creating tools directory...\"\n    New-Item -Path $TOOLS_DIR -Type directory | out-null\n}\n\n# Make sure that packages.config exist.\nif (!(Test-Path $PACKAGES_CONFIG)) {\n    Write-Verbose -Message \"Downloading packages.config...\"    \n    try {        \n        $wc = GetProxyEnabledWebClient\n        $wc.DownloadFile(\"https://cakebuild.net/download/bootstrapper/packages\", $PACKAGES_CONFIG) } catch {\n        Throw \"Could not download packages.config.\"\n    }\n}\n\n# Try find NuGet.exe in path if not exists\nif (!(Test-Path $NUGET_EXE)) {\n    Write-Verbose -Message \"Trying to find nuget.exe in PATH...\"\n    $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) }\n    $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter \"nuget.exe\" | Select -First 1\n    if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {\n        Write-Verbose -Message \"Found in PATH at $($NUGET_EXE_IN_PATH.FullName).\"\n        $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName\n    }\n}\n\n# Try download NuGet.exe if not exists\nif (!(Test-Path $NUGET_EXE)) {\n    Write-Verbose -Message \"Downloading NuGet.exe...\"\n    try {\n        $wc = GetProxyEnabledWebClient\n        $wc.DownloadFile($NUGET_URL, $NUGET_EXE)\n    } catch {\n        Throw \"Could not download NuGet.exe.\"\n    }\n}\n\n# Save nuget.exe path to environment to be available to child processed\n$ENV:NUGET_EXE = $NUGET_EXE\n\n# Restore tools from NuGet?\nif(-Not $SkipToolPackageRestore.IsPresent) {\n    Push-Location\n    Set-Location $TOOLS_DIR\n\n    # Check for changes in packages.config and remove installed tools if true.\n    [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)\n    if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or\n      ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {\n        Write-Verbose -Message \"Missing or changed package.config hash...\"\n        Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery |\n        Remove-Item -Recurse\n    }\n\n    Write-Verbose -Message \"Restoring tools from NuGet...\"\n    $NuGetOutput = Invoke-Expression \"&`\"$NUGET_EXE`\" install -ExcludeVersion -OutputDirectory `\"$TOOLS_DIR`\"\"\n\n    if ($LASTEXITCODE -ne 0) {\n        Throw \"An error occurred while restoring NuGet tools.\"\n    }\n    else\n    {\n        $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding \"ASCII\"\n    }\n    Write-Verbose -Message ($NuGetOutput | out-string)\n\n    Pop-Location\n}\n\n# Restore addins from NuGet\nif (Test-Path $ADDINS_PACKAGES_CONFIG) {\n    Push-Location\n    Set-Location $ADDINS_DIR\n\n    Write-Verbose -Message \"Restoring addins from NuGet...\"\n    $NuGetOutput = Invoke-Expression \"&`\"$NUGET_EXE`\" install -ExcludeVersion -OutputDirectory `\"$ADDINS_DIR`\"\"\n\n    if ($LASTEXITCODE -ne 0) {\n        Throw \"An error occurred while restoring NuGet addins.\"\n    }\n\n    Write-Verbose -Message ($NuGetOutput | out-string)\n\n    Pop-Location\n}\n\n# Restore modules from NuGet\nif (Test-Path $MODULES_PACKAGES_CONFIG) {\n    Push-Location\n    Set-Location $MODULES_DIR\n\n    Write-Verbose -Message \"Restoring modules from NuGet...\"\n    $NuGetOutput = Invoke-Expression \"&`\"$NUGET_EXE`\" install -ExcludeVersion -OutputDirectory `\"$MODULES_DIR`\"\"\n\n    if ($LASTEXITCODE -ne 0) {\n        Throw \"An error occurred while restoring NuGet modules.\"\n    }\n\n    Write-Verbose -Message ($NuGetOutput | out-string)\n\n    Pop-Location\n}\n\n# Make sure that Cake has been installed.\nif (!(Test-Path $CAKE_EXE)) {\n    Throw \"Could not find Cake.exe at $CAKE_EXE\"\n}\n\n\n\n# Build Cake arguments\n$cakeArguments = @(\"$Script\");\nif ($Target) { $cakeArguments += \"-target=$Target\" }\nif ($Configuration) { $cakeArguments += \"-configuration=$Configuration\" }\nif ($Verbosity) { $cakeArguments += \"-verbosity=$Verbosity\" }\nif ($ShowDescription) { $cakeArguments += \"-showdescription\" }\nif ($DryRun) { $cakeArguments += \"-dryrun\" }\nif ($Experimental) { $cakeArguments += \"-experimental\" }\nif ($Mono) { $cakeArguments += \"-mono\" }\n$cakeArguments += $ScriptArgs\n\n# Start Cake\nWrite-Host \"Running build script...\"\n&$CAKE_EXE $cakeArguments\nexit $LASTEXITCODE\n"
  },
  {
    "path": "build.sh",
    "content": "#!/usr/bin/env bash\n\n##########################################################################\n# This is the Cake bootstrapper script for Linux and OS X.\n# This file was downloaded from https://github.com/cake-build/resources\n# Feel free to change this file to fit your needs.\n##########################################################################\n\n# Define directories.\nSCRIPT_DIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nTOOLS_DIR=$SCRIPT_DIR/tools\nADDINS_DIR=$TOOLS_DIR/Addins\nMODULES_DIR=$TOOLS_DIR/Modules\nNUGET_EXE=$TOOLS_DIR/nuget.exe\nCAKE_EXE=$TOOLS_DIR/Cake/Cake.exe\nPACKAGES_CONFIG=$TOOLS_DIR/packages.config\nPACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum\nADDINS_PACKAGES_CONFIG=$ADDINS_DIR/packages.config\nMODULES_PACKAGES_CONFIG=$MODULES_DIR/packages.config\n\n# Define md5sum or md5 depending on Linux/OSX\nMD5_EXE=\nif [[ \"$(uname -s)\" == \"Darwin\" ]]; then\n    MD5_EXE=\"md5 -r\"\nelse\n    MD5_EXE=\"md5sum\"\nfi\n\n# Define default arguments.\nSCRIPT=\"build.cake\"\nCAKE_ARGUMENTS=()\n\n# Parse arguments.\nfor i in \"$@\"; do\n    case $1 in\n        -s|--script) SCRIPT=\"$2\"; shift ;;\n        --) shift; CAKE_ARGUMENTS+=(\"$@\"); break ;;\n        *) CAKE_ARGUMENTS+=(\"$1\") ;;\n    esac\n    shift\ndone\n\n# Make sure the tools folder exist.\nif [ ! -d \"$TOOLS_DIR\" ]; then\n  mkdir \"$TOOLS_DIR\"\nfi\n\n# Make sure that packages.config exist.\nif [ ! -f \"$TOOLS_DIR/packages.config\" ]; then\n    echo \"Downloading packages.config...\"\n    curl -Lsfo \"$TOOLS_DIR/packages.config\" https://cakebuild.net/download/bootstrapper/packages\n    if [ $? -ne 0 ]; then\n        echo \"An error occurred while downloading packages.config.\"\n        exit 1\n    fi\nfi\n\n# Download NuGet if it does not exist.\nif [ ! -f \"$NUGET_EXE\" ]; then\n    echo \"Downloading NuGet...\"\n    curl -Lsfo \"$NUGET_EXE\" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe\n    if [ $? -ne 0 ]; then\n        echo \"An error occurred while downloading nuget.exe.\"\n        exit 1\n    fi\nfi\n\n# Restore tools from NuGet.\npushd \"$TOOLS_DIR\" >/dev/null\nif [ ! -f \"$PACKAGES_CONFIG_MD5\" ] || [ \"$( cat \"$PACKAGES_CONFIG_MD5\" | sed 's/\\r$//' )\" != \"$( $MD5_EXE \"$PACKAGES_CONFIG\" | awk '{ print $1 }' )\" ]; then\n    find . -type d ! -name . ! -name 'Cake.Bakery' | xargs rm -rf\nfi\n\nmono \"$NUGET_EXE\" install -ExcludeVersion\nif [ $? -ne 0 ]; then\n    echo \"Could not restore NuGet tools.\"\n    exit 1\nfi\n\n$MD5_EXE \"$PACKAGES_CONFIG\" | awk '{ print $1 }' >| \"$PACKAGES_CONFIG_MD5\"\n\npopd >/dev/null\n\n# Restore addins from NuGet.\nif [ -f \"$ADDINS_PACKAGES_CONFIG\" ]; then\n    pushd \"$ADDINS_DIR\" >/dev/null\n\n    mono \"$NUGET_EXE\" install -ExcludeVersion\n    if [ $? -ne 0 ]; then\n        echo \"Could not restore NuGet addins.\"\n        exit 1\n    fi\n\n    popd >/dev/null\nfi\n\n# Restore modules from NuGet.\nif [ -f \"$MODULES_PACKAGES_CONFIG\" ]; then\n    pushd \"$MODULES_DIR\" >/dev/null\n\n    mono \"$NUGET_EXE\" install -ExcludeVersion\n    if [ $? -ne 0 ]; then\n        echo \"Could not restore NuGet modules.\"\n        exit 1\n    fi\n\n    popd >/dev/null\nfi\n\n# Make sure that Cake has been installed.\nif [ ! -f \"$CAKE_EXE\" ]; then\n    echo \"Could not find Cake.exe at '$CAKE_EXE'.\"\n    exit 1\nfi\n\n# Start Cake\nexec mono \"$CAKE_EXE\" $SCRIPT \"${CAKE_ARGUMENTS[@]}\"\n"
  },
  {
    "path": "nuget/Xamarin.Controls.SignaturePad.Forms.nuspec",
    "content": "<?xml version=\"1.0\"?>\n<package xmlns=\"http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd\">\n\n  <metadata>\n    <id>Xamarin.Controls.SignaturePad.Forms</id>\n    <title>SignaturePad for Xamarin.Forms</title>\n    <version>$version$</version>\n    <authors>Microsoft</authors>\n    <owners>Microsoft</owners>\n    <requireLicenseAcceptance>true</requireLicenseAcceptance>\n    <licenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</licenseUrl>\n    <projectUrl>https://go.microsoft.com/fwlink/?linkid=874507</projectUrl>\n    <iconUrl>https://go.microsoft.com/fwlink/?linkid=874510</iconUrl>\n    <description>Makes capturing, saving, and displaying signatures extremely simple.</description>\n    <releaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</releaseNotes>\n    <copyright>© Microsoft Corporation. All rights reserved.</copyright>\n    <tags>xamarin,signature,handwriting,windows,ios,android,uwp,xamarin.forms</tags>\n    <repository url=\"https://go.microsoft.com/fwlink/?linkid=874507\" />\n\n    <dependencies>\n      <group targetFramework=\"MonoAndroid\">\n        <dependency id=\"Xamarin.Controls.SignaturePad\" version=\"$version$\" exclude=\"Build,Analyzers\" />\n        <dependency id=\"Xamarin.Forms\" version=\"2.5.0.280555\" exclude=\"Build,Analyzers\" />\n      </group>\n      <group targetFramework=\"Xamarin.iOS\">\n        <dependency id=\"Xamarin.Controls.SignaturePad\" version=\"$version$\" exclude=\"Build,Analyzers\" />\n        <dependency id=\"Xamarin.Forms\" version=\"2.5.0.280555\" exclude=\"Build,Analyzers\" />\n      </group>\n      <group targetFramework=\"uap10.0\">\n        <dependency id=\"Xamarin.Controls.SignaturePad\" version=\"$version$\" exclude=\"Build,Analyzers\" />\n        <dependency id=\"Xamarin.Forms\" version=\"2.5.0.280555\" exclude=\"Build,Analyzers\" />\n      </group>\n      <group targetFramework=\"netstandard1.0\">\n        <dependency id=\"Xamarin.Forms\" version=\"2.5.0.280555\" exclude=\"Build,Analyzers\" />\n      </group>\n    </dependencies>\n  </metadata>\n\n  <files>\n    <file src=\"output/android/SignaturePad.Forms.dll\" target=\"lib/MonoAndroid/SignaturePad.Forms.dll\" />\n    <file src=\"output/android/SignaturePad.Forms.xml\" target=\"lib/MonoAndroid/SignaturePad.Forms.xml\" />\n\n    <file src=\"output/ios/SignaturePad.Forms.dll\" target=\"lib/Xamarin.iOS/SignaturePad.Forms.dll\" />\n    <file src=\"output/ios/SignaturePad.Forms.xml\" target=\"lib/Xamarin.iOS/SignaturePad.Forms.xml\" />\n\n    <file src=\"output/uwp/SignaturePad.Forms.dll\" target=\"lib/uap10.0/SignaturePad.Forms.dll\" />\n    <file src=\"output/uwp/SignaturePad.Forms.xml\" target=\"lib/uap10.0/SignaturePad.Forms.xml\" />\n    <file src=\"output/uwp/SignaturePad.Forms.pri\" target=\"lib/uap10.0/SignaturePad.Forms.pri\" />\n\n    <file src=\"output/netstandard/SignaturePad.Forms.dll\" target=\"lib/netstandard1.0/SignaturePad.Forms.dll\" />\n    <file src=\"output/netstandard/SignaturePad.Forms.xml\" target=\"lib/netstandard1.0/SignaturePad.Forms.xml\" />\n  </files>\n\n</package>"
  },
  {
    "path": "nuget/Xamarin.Controls.SignaturePad.nuspec",
    "content": "<?xml version=\"1.0\"?>\n<package xmlns=\"http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd\">\n\n  <metadata>\n    <id>Xamarin.Controls.SignaturePad</id>\n    <title>SignaturePad for Xamarin and Windows</title>\n    <version>$version$</version>\n    <authors>Microsoft</authors>\n    <owners>Microsoft</owners>\n    <requireLicenseAcceptance>true</requireLicenseAcceptance>\n    <licenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</licenseUrl>\n    <projectUrl>https://go.microsoft.com/fwlink/?linkid=874507</projectUrl>\n    <iconUrl>https://go.microsoft.com/fwlink/?linkid=874510</iconUrl>\n    <description>Makes capturing, saving, and displaying signatures extremely simple.</description>\n    <releaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</releaseNotes>\n    <copyright>© Microsoft Corporation. All rights reserved.</copyright>\n    <tags>xamarin,signature,handwriting,windows,ios,android,uwp</tags>\n    <repository url=\"https://go.microsoft.com/fwlink/?linkid=874507\" />\n\n    <dependencies>\n      <group targetFramework=\"MonoAndroid\" />\n      <group targetFramework=\"Xamarin.iOS\" />\n      <group targetFramework=\"uap10.0\">\n        <dependency id=\"Microsoft.NETCore.UniversalWindowsPlatform\" version=\"6.0.8\" exclude=\"Build,Analyzers\" />\n        <dependency id=\"Win2D.uwp\" version=\"1.21.0\" exclude=\"Build,Analyzers\" />\n      </group>\n    </dependencies>\n  </metadata>\n\n  <files>\n    <file src=\"output/android/SignaturePad.dll\" target=\"lib/MonoAndroid/SignaturePad.dll\" />\n    <file src=\"output/android/SignaturePad.xml\" target=\"lib/MonoAndroid/SignaturePad.xml\" />\n\n    <file src=\"output/ios/SignaturePad.dll\" target=\"lib/Xamarin.iOS/SignaturePad.dll\" />\n    <file src=\"output/ios/SignaturePad.xml\" target=\"lib/Xamarin.iOS/SignaturePad.xml\" />\n\n    <file src=\"output/uwp/SignaturePad.dll\" target=\"lib/uap10.0/SignaturePad.dll\" />\n    <file src=\"output/uwp/SignaturePad.xml\" target=\"lib/uap10.0/SignaturePad.xml\" />\n    <file src=\"output/uwp/SignaturePad.pri\" target=\"lib/uap10.0/SignaturePad.pri\" />\n    <file src=\"output/uwp/Themes/Generic.xbf\" target=\"lib/uap10.0/SignaturePad/Themes/Generic.xbf\" />\n    <file src=\"output/uwp/SignaturePad.xr.xml\" target=\"lib/uap10.0/SignaturePad/SignaturePad.xr.xml\" />\n  </files>\n\n</package>\n"
  },
  {
    "path": "samples/Sample.Android/MainActivity.cs",
    "content": "﻿using System.IO;\nusing Android.App;\nusing Android.Graphics;\nusing Android.OS;\nusing Android.Support.V7.App;\nusing Android.Widget;\n\nusing Xamarin.Controls;\n\nnamespace Sample.Android\n{\n\t[Activity (MainLauncher = true)]\n\tpublic class MainActivity : AppCompatActivity\n\t{\n\t\tprivate System.Drawing.PointF[] points;\n\n\t\tprotected override void OnCreate (Bundle bundle)\n\t\t{\n\t\t\tbase.OnCreate (bundle);\n\n\t\t\tSetContentView (Resource.Layout.main);\n\n\t\t\tvar signatureView = FindViewById<SignaturePadView> (Resource.Id.signatureView);\n\n\t\t\tvar btnSave = FindViewById<Button> (Resource.Id.btnSave);\n\t\t\tvar btnLoad = FindViewById<Button> (Resource.Id.btnLoad);\n\t\t\tvar btnSaveImage = FindViewById<Button> (Resource.Id.btnSaveImage);\n\n\t\t\tbtnSave.Click += delegate\n\t\t\t{\n\t\t\t\tpoints = signatureView.Points;\n\n\t\t\t\tToast.MakeText (this, \"Vector signature saved to memory.\", ToastLength.Short).Show ();\n\t\t\t};\n\n\t\t\tbtnLoad.Click += delegate\n\t\t\t{\n\t\t\t\tif (points != null)\n\t\t\t\t\tsignatureView.LoadPoints (points);\n\t\t\t};\n\n\t\t\tbtnSaveImage.Click += async delegate\n\t\t\t{\n\t\t\t\tvar path = Environment.GetExternalStoragePublicDirectory (Environment.DirectoryPictures).AbsolutePath;\n\t\t\t\tvar file = System.IO.Path.Combine (path, \"signature.png\");\n\n\t\t\t\tusing (var bitmap = await signatureView.GetImageStreamAsync (SignatureImageFormat.Png, Color.Black, Color.White, 1f))\n\t\t\t\tusing (var dest = File.OpenWrite (file))\n\t\t\t\t{\n\t\t\t\t\tawait bitmap.CopyToAsync (dest);\n\t\t\t\t}\n\n\t\t\t\tToast.MakeText (this, \"Raster signature saved to the photo gallery.\", ToastLength.Short).Show ();\n\t\t\t};\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Android/Properties/AndroidManifest.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" android:versionCode=\"1\" android:versionName=\"1.0\" package=\"com.xamarin.signaturepad\" android:installLocation=\"auto\">\n\t<uses-sdk android:minSdkVersion=\"10\" />\n\t<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n\t<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\n\t<application android:label=\"@string/app_name\" android:icon=\"@drawable/ic_launcher\" android:theme=\"@style/Theme.AppCompat.Light.DarkActionBar\"></application>\n</manifest>"
  },
  {
    "path": "samples/Sample.Android/Properties/AssemblyInfo.cs",
    "content": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing Android.App;\n\n// Information about this assembly is defined by the following attributes. \n// Change them to the values specific to your project.\n\n[assembly: AssemblyTitle(\"Sample.Android\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"\")]\n[assembly: AssemblyCopyright(\"Tim\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// The assembly version has the format \"{Major}.{Minor}.{Build}.{Revision}\".\n// The form \"{Major}.{Minor}.*\" will automatically update the build and revision,\n// and \"{Major}.{Minor}.{Build}.*\" will update just the revision.\n\n[assembly: AssemblyVersion(\"1.0.0\")]\n\n// The following attributes are used to specify the signing key for the assembly, \n// if desired. See the Mono documentation for more information about signing.\n\n//[assembly: AssemblyDelaySign(false)]\n//[assembly: AssemblyKeyFile(\"\")]\n\n"
  },
  {
    "path": "samples/Sample.Android/Resources/drawable/background.xml",
    "content": "﻿<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n  <solid android:color=\"#FAFAD2\"/>\n  <stroke android:width=\"1dip\" android:color=\"#B8860B\" />\n</shape>\n"
  },
  {
    "path": "samples/Sample.Android/Resources/layout/main.axml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"12dp\">\n    <xamarin.controls.SignaturePadView\n        android:id=\"@+id/signatureView\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"fill_parent\"\n        android:layout_marginBottom=\"12dp\"\n        android:layout_above=\"@+id/btnSave\"\n        android:background=\"@drawable/background\"\n        app:signatureLineColor=\"#B8860B\"\n        app:captionTextColor=\"#B8860B\"\n        app:signaturePromptTextColor=\"#B8860B\"\n        app:clearLabelTextColor=\"#B8860B\" />\n    <Button\n        android:id=\"@+id/btnSave\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Save\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignParentLeft=\"true\" />\n    <Button\n        android:id=\"@+id/btnLoad\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Load\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_centerHorizontal=\"true\" />\n    <Button\n        android:id=\"@+id/btnSaveImage\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Export\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignParentRight=\"true\" />\n</RelativeLayout>"
  },
  {
    "path": "samples/Sample.Android/Resources/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\t<string name=\"app_name\">Signature Pad</string>\n</resources>\n"
  },
  {
    "path": "samples/Sample.Android/Sample.Android.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProductVersion>8.0.30703</ProductVersion>\n    <SchemaVersion>2.0</SchemaVersion>\n    <ProjectGuid>{B07C8650-5086-4650-AC6F-ACCF1291A952}</ProjectGuid>\n    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <OutputType>Library</OutputType>\n    <RootNamespace>Sample.Android</RootNamespace>\n    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>\n    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>\n    <AndroidResgenClass>Resource</AndroidResgenClass>\n    <AndroidApplication>True</AndroidApplication>\n    <AndroidResgenFile>Resources\\Resource.designer.cs</AndroidResgenFile>\n    <AssemblyName>Sample.Android</AssemblyName>\n    <AndroidManifest>Properties\\AndroidManifest.xml</AndroidManifest>\n    <TargetFrameworkVersion>v7.1</TargetFrameworkVersion>\n    <AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>True</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>False</Optimize>\n    <OutputPath>bin\\Debug</OutputPath>\n    <DefineConstants>DEBUG;</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <ConsolePause>False</ConsolePause>\n    <AndroidLinkMode>None</AndroidLinkMode>\n    <EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>\n    <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>\n    <Debugger>.Net (Xamarin)</Debugger>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>none</DebugType>\n    <Optimize>True</Optimize>\n    <OutputPath>bin\\Release</OutputPath>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <ConsolePause>False</ConsolePause>\n    <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>\n    <AndroidSupportedAbis>armeabi,armeabi-v7a,x86,x86_64,arm64-v8a</AndroidSupportedAbis>\n    <AndroidLinkMode>Full</AndroidLinkMode>\n    <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>\n    <Debugger>Xamarin</Debugger>\n    <DebugSymbols>False</DebugSymbols>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"Mono.Android\" />\n  </ItemGroup>\n  <ItemGroup>\n    <PackageReference Include=\"Xamarin.Android.Support.Animated.Vector.Drawable\" Version=\"25.4.0.2\" />\n    <PackageReference Include=\"Xamarin.Android.Support.v4\" Version=\"25.4.0.2\" />\n    <PackageReference Include=\"Xamarin.Android.Support.v7.AppCompat\" Version=\"25.4.0.2\" />\n    <PackageReference Include=\"Xamarin.Android.Support.Vector.Drawable\" Version=\"25.4.0.2\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\SignaturePad.Android\\SignaturePad.Android.csproj\">\n      <Project>{f1a16cb9-a759-42c8-8f0b-3c9698a55336}</Project>\n      <Name>SignaturePad.Android</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"MainActivity.cs\" />\n    <Compile Include=\"Resources\\Resource.designer.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"Properties\\AndroidManifest.xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <AndroidResource Include=\"Resources\\drawable\\background.xml\" />\n    <AndroidResource Include=\"Resources\\drawable\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-hdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-ldpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-mdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-xhdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-xxhdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-xxxhdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\layout\\main.axml\" />\n    <AndroidResource Include=\"Resources\\values\\strings.xml\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildExtensionsPath)\\Xamarin\\Android\\Xamarin.Android.CSharp.targets\" />\n</Project>"
  },
  {
    "path": "samples/Sample.Android/Sample.Android.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26228.10\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Sample.Android\", \"Sample.Android.csproj\", \"{B07C8650-5086-4650-AC6F-ACCF1291A952}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Android\", \"..\\..\\src\\SignaturePad.Android\\SignaturePad.Android.csproj\", \"{F1A16CB9-A759-42C8-8F0B-3C9698A55336}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{B07C8650-5086-4650-AC6F-ACCF1291A952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B07C8650-5086-4650-AC6F-ACCF1291A952}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B07C8650-5086-4650-AC6F-ACCF1291A952}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\n\t\t{B07C8650-5086-4650-AC6F-ACCF1291A952}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B07C8650-5086-4650-AC6F-ACCF1291A952}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B07C8650-5086-4650-AC6F-ACCF1291A952}.Release|Any CPU.Deploy.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {0684DA9F-D626-4CEC-B4F2-0C49327E9F9F}\n\tEndGlobalSection\n\tGlobalSection(MonoDevelopProperties) = preSolution\n\t\tStartupItem = Sample.Android.csproj\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "samples/Sample.Forms/Sample.Forms.Mac.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26228.10\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.iOS\", \"..\\..\\src\\SignaturePad.iOS\\SignaturePad.iOS.csproj\", \"{BEF71536-787B-431F-AC7F-A6469710D11F}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Android\", \"..\\..\\src\\SignaturePad.Android\\SignaturePad.Android.csproj\", \"{F1A16CB9-A759-42C8-8F0B-3C9698A55336}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms\", \"..\\..\\src\\SignaturePad.Forms\\SignaturePad.Forms.csproj\", \"{B2AF970D-D640-451C-95AF-92AF531B8C1E}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.Droid\", \"..\\..\\src\\SignaturePad.Forms.Droid\\SignaturePad.Forms.Droid.csproj\", \"{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.iOS\", \"..\\..\\src\\SignaturePad.Forms.iOS\\SignaturePad.Forms.iOS.csproj\", \"{B12D20AA-0EDF-4903-B385-BB8090848532}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Samples\", \"Samples\\Samples.csproj\", \"{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Samples.Android\", \"Samples.Android\\Samples.Android.csproj\", \"{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Samples.iOS\", \"Samples.iOS\\Samples.iOS.csproj\", \"{2142B859-21E9-484D-880A-26AD708569DB}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tDebug|iPhone = Debug|iPhone\n\t\tDebug|iPhoneSimulator = Debug|iPhoneSimulator\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease|iPhone = Release|iPhone\n\t\tRelease|iPhoneSimulator = Release|iPhoneSimulator\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhone.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|Any CPU.Deploy.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhone.Deploy.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|Any CPU.ActiveCfg = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|Any CPU.Build.0 = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhone.ActiveCfg = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhone.Build.0 = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|Any CPU.ActiveCfg = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|Any CPU.Build.0 = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhone.ActiveCfg = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhone.Build.0 = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {6E5B2192-8C7B-4902-9EB8-51708EE9BBE1}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "samples/Sample.Forms/Sample.Forms.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26228.10\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.iOS\", \"..\\..\\src\\SignaturePad.iOS\\SignaturePad.iOS.csproj\", \"{BEF71536-787B-431F-AC7F-A6469710D11F}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Android\", \"..\\..\\src\\SignaturePad.Android\\SignaturePad.Android.csproj\", \"{F1A16CB9-A759-42C8-8F0B-3C9698A55336}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms\", \"..\\..\\src\\SignaturePad.Forms\\SignaturePad.Forms.csproj\", \"{B2AF970D-D640-451C-95AF-92AF531B8C1E}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.Droid\", \"..\\..\\src\\SignaturePad.Forms.Droid\\SignaturePad.Forms.Droid.csproj\", \"{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.iOS\", \"..\\..\\src\\SignaturePad.Forms.iOS\\SignaturePad.Forms.iOS.csproj\", \"{B12D20AA-0EDF-4903-B385-BB8090848532}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"Samples\", \"Samples\\Samples.csproj\", \"{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Samples.Android\", \"Samples.Android\\Samples.Android.csproj\", \"{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Samples.iOS\", \"Samples.iOS\\Samples.iOS.csproj\", \"{2142B859-21E9-484D-880A-26AD708569DB}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Samples.UWP\", \"Samples.UWP\\Samples.UWP.csproj\", \"{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.UWP\", \"..\\..\\src\\SignaturePad.UWP\\SignaturePad.UWP.csproj\", \"{16131FDC-D50B-4EF2-8ECC-661184FF80DB}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.UWP\", \"..\\..\\src\\SignaturePad.Forms.UWP\\SignaturePad.Forms.UWP.csproj\", \"{6FC62387-6717-4577-A48B-D15848741F08}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tDebug|ARM = Debug|ARM\n\t\tDebug|iPhone = Debug|iPhone\n\t\tDebug|iPhoneSimulator = Debug|iPhoneSimulator\n\t\tDebug|x64 = Debug|x64\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease|ARM = Release|ARM\n\t\tRelease|iPhone = Release|iPhone\n\t\tRelease|iPhoneSimulator = Release|iPhoneSimulator\n\t\tRelease|x64 = Release|x64\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|x64.Build.0 = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|x86.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|x64.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|x86.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|x64.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|x86.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|x64.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|x86.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|x64.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|x86.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|x64.Build.0 = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}.Release|x86.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|ARM.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhone.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|x64.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Debug|x86.Deploy.0 = Debug|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|Any CPU.Deploy.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|ARM.Deploy.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhone.Deploy.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|x64.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|x64.Deploy.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|x86.Build.0 = Release|Any CPU\n\t\t{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}.Release|x86.Deploy.0 = Release|Any CPU\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|Any CPU.ActiveCfg = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|Any CPU.Build.0 = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|ARM.ActiveCfg = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|ARM.Build.0 = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhone.ActiveCfg = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhone.Build.0 = Debug|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|x64.Build.0 = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Debug|x86.Build.0 = Debug|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|Any CPU.ActiveCfg = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|Any CPU.Build.0 = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|ARM.ActiveCfg = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|ARM.Build.0 = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhone.ActiveCfg = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhone.Build.0 = Release|iPhone\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|x64.ActiveCfg = Release|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|x64.Build.0 = Release|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|x86.ActiveCfg = Release|iPhoneSimulator\n\t\t{2142B859-21E9-484D-880A-26AD708569DB}.Release|x86.Build.0 = Release|iPhoneSimulator\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|Any CPU.ActiveCfg = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|Any CPU.Build.0 = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|Any CPU.Deploy.0 = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|ARM.ActiveCfg = Debug|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|ARM.Build.0 = Debug|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|ARM.Deploy.0 = Debug|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|iPhone.ActiveCfg = Debug|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|iPhone.Build.0 = Debug|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|iPhone.Deploy.0 = Debug|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|iPhoneSimulator.Build.0 = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|x64.Build.0 = Debug|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|x64.Deploy.0 = Debug|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|x86.ActiveCfg = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|x86.Build.0 = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Debug|x86.Deploy.0 = Debug|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|Any CPU.ActiveCfg = Release|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|Any CPU.Build.0 = Release|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|Any CPU.Deploy.0 = Release|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|ARM.ActiveCfg = Release|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|ARM.Build.0 = Release|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|ARM.Deploy.0 = Release|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|iPhone.ActiveCfg = Release|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|iPhone.Build.0 = Release|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|iPhone.Deploy.0 = Release|ARM\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|iPhoneSimulator.ActiveCfg = Release|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|iPhoneSimulator.Build.0 = Release|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|iPhoneSimulator.Deploy.0 = Release|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|x64.ActiveCfg = Release|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|x64.Build.0 = Release|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|x64.Deploy.0 = Release|x64\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|x86.ActiveCfg = Release|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|x86.Build.0 = Release|x86\n\t\t{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}.Release|x86.Deploy.0 = Release|x86\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x64.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x86.Build.0 = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|iPhone.ActiveCfg = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|iPhone.Build.0 = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|iPhone.ActiveCfg = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|iPhone.Build.0 = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|x64.Build.0 = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|x86.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {6E5B2192-8C7B-4902-9EB8-51708EE9BBE1}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/App.xaml",
    "content": "﻿<Application xmlns=\"http://xamarin.com/schemas/2014/forms\"\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n             x:Class=\"Samples.App\">\n\n    <Application.Resources>\n    </Application.Resources>\n\n</Application>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/App.xaml.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Threading.Tasks;\nusing Xamarin.Forms;\nusing Xamarin.Forms.Xaml;\n\n[assembly: XamlCompilation (XamlCompilationOptions.Compile)]\n\nnamespace Samples\n{\n\tpublic partial class App : Application\n\t{\n\t\tprivate readonly Func<Stream, string, Task<bool>> saveSignatureDelegate;\n\n\t\tpublic App (Func<Stream, string, Task<bool>> saveSignature)\n\t\t{\n\t\t\tInitializeComponent ();\n\n\t\t\tsaveSignatureDelegate = saveSignature;\n\n\t\t\tMainPage = new NavigationPage (new MainPage ());\n\t\t}\n\n\t\tpublic static Task<bool> SaveSignature (Stream bitmap, string filename)\n\t\t{\n\t\t\treturn ((App)Application.Current).saveSignatureDelegate (bitmap, filename);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/BindingPage.xaml",
    "content": "﻿<ContentPage xmlns=\"http://xamarin.com/schemas/2014/forms\"\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n             xmlns:local=\"clr-namespace:Samples\"\n             xmlns:controls=\"clr-namespace:SignaturePad.Forms;assembly=SignaturePad.Forms\"\n             x:Class=\"Samples.BindingPage\"\n             Title=\"Data Binding\">\n\n    <ContentPage.Resources>\n        <ResourceDictionary>\n            <local:NotConverter x:Key=\"NotConverter\" />\n        </ResourceDictionary>\n    </ContentPage.Resources>\n\n    <Grid x:Name=\"LayoutRoot\" Padding=\"12\">\n\n        <Grid.RowDefinitions>\n            <RowDefinition Height=\"*\" />\n            <RowDefinition Height=\"12\" />\n            <RowDefinition Height=\"Auto\" />\n        </Grid.RowDefinitions>\n\n        <ContentView Padding=\"1\" BackgroundColor=\"#B8860B\">\n            <controls:SignaturePadView\n                x:Name=\"signaturePadView\"\n                StrokeCompletedCommand=\"{Binding StrokeCompletedCommand}\"\n                ClearedCommand=\"{Binding ClearedCommand}\"\n                CaptionTextColor=\"#B8860B\" ClearTextColor=\"#B8860B\" PromptTextColor=\"#B8860B\"\n                SignatureLineColor=\"#B8860B\" BackgroundColor=\"#FAFAD2\">\n                <controls:SignaturePadView.Behaviors>\n                    <local:CaptureSignaturePointsBehavior Points=\"{Binding CurrentSignature}\" />\n                </controls:SignaturePadView.Behaviors>\n            </controls:SignaturePadView>\n        </ContentView>\n\n        <Button\n            Text=\"Save Vector\"\n            Command=\"{Binding SaveVectorCommand}\"\n            IsEnabled=\"{Binding IsBlank, Source={Reference signaturePadView}, Converter={StaticResource NotConverter}}\"\n            HorizontalOptions=\"Start\" VerticalOptions=\"End\" Grid.Row=\"2\" />\n\n        <Button\n            Text=\"Load Vector\"\n            Command=\"{Binding LoadVectorCommand}\"\n            IsEnabled=\"{Binding HasSavedSignature}\"\n            HorizontalOptions=\"Center\" VerticalOptions=\"End\" Grid.Row=\"2\" />\n\n        <Button\n            Text=\"Save Image\"\n            Command=\"{Binding SaveImageCommand}\"\n            IsEnabled=\"{Binding IsBlank, Source={Reference signaturePadView}, Converter={StaticResource NotConverter}}\"\n            HorizontalOptions=\"End\" VerticalOptions=\"End\" Grid.Row=\"2\" />\n\n    </Grid>\n\n</ContentPage>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/BindingPage.xaml.cs",
    "content": "﻿using Xamarin.Forms;\n\nnamespace Samples\n{\n\tpublic partial class BindingPage : ContentPage\n\t{\n\t\tpublic BindingPage ()\n\t\t{\n\t\t\tInitializeComponent ();\n\n\t\t\tBindingContext = new BindingViewModel (signaturePadView.GetImageStreamAsync);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/BindingPageViewModel.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing System.Windows.Input;\nusing Xamarin.Forms;\n\nusing SignaturePad.Forms;\n\nnamespace Samples\n{\n\tpublic class BindingViewModel : BindableObject\n\t{\n\t\tprivate IEnumerable<Point> currentSignature;\n\t\tprivate Point[] savedSignature;\n\n\t\tpublic BindingViewModel (Func<SignatureImageFormat, ImageConstructionSettings, Task<Stream>> getImageDelegate)\n\t\t{\n\t\t\tGetImageStreamAsync = getImageDelegate;\n\n\t\t\tSaveVectorCommand = new Command (OnSaveVector);\n\t\t\tLoadVectorCommand = new Command (OnLoadVector);\n\t\t\tSaveImageCommand = new Command (OnSaveImage);\n\t\t}\n\n\t\tpublic IEnumerable<Point> CurrentSignature\n\t\t{\n\t\t\tget => currentSignature;\n\t\t\tset\n\t\t\t{\n\t\t\t\tcurrentSignature = value;\n\t\t\t\tOnPropertyChanged ();\n\t\t\t}\n\t\t}\n\n\t\tpublic Point[] SavedSignature\n\t\t{\n\t\t\tget => savedSignature;\n\t\t\tset\n\t\t\t{\n\t\t\t\tsavedSignature = value;\n\t\t\t\tOnPropertyChanged ();\n\t\t\t\tOnPropertyChanged (nameof (HasSavedSignature));\n\t\t\t}\n\t\t}\n\n\t\tpublic bool HasSavedSignature => SavedSignature?.Length > 0;\n\n\t\tpublic ICommand SaveVectorCommand { get; }\n\n\t\tpublic ICommand LoadVectorCommand { get; }\n\n\t\tpublic ICommand SaveImageCommand { get; }\n\n\t\tprivate Func<SignatureImageFormat, ImageConstructionSettings, Task<Stream>> GetImageStreamAsync { get; }\n\n\t\tprivate void OnSaveVector ()\n\t\t{\n\t\t\tSavedSignature = CurrentSignature.ToArray ();\n\n\t\t\tDisplayAlert (\"Vector signature saved to memory.\");\n\t\t}\n\n\t\tprivate void OnLoadVector ()\n\t\t{\n\t\t\tCurrentSignature = SavedSignature;\n\t\t}\n\n\t\tprivate async void OnSaveImage ()\n\t\t{\n\t\t\tvar settings = new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tStrokeColor = Color.Black,\n\t\t\t\tBackgroundColor = Color.White,\n\t\t\t\tStrokeWidth = 1f\n\t\t\t};\n\n\t\t\tusing (var bitmap = await GetImageStreamAsync (SignatureImageFormat.Png, settings))\n\t\t\t{\n\t\t\t\tvar saved = await App.SaveSignature (bitmap, \"signature.png\");\n\n\t\t\t\tif (saved)\n\t\t\t\t\tDisplayAlert (\"Raster signature saved to the photo library.\");\n\t\t\t\telse\n\t\t\t\t\tDisplayAlert (\"There was an error saving the signature.\");\n\t\t\t}\n\t\t}\n\n\t\tprivate void DisplayAlert (string message)\n\t\t{\n\t\t\tApplication.Current.MainPage.DisplayAlert (\"Signature Pad\", message, \"OK\");\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/EventsPage.xaml",
    "content": "﻿<ContentPage xmlns=\"http://xamarin.com/schemas/2014/forms\"\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n             xmlns:local=\"clr-namespace:Samples\"\n             xmlns:controls=\"clr-namespace:SignaturePad.Forms;assembly=SignaturePad.Forms\"\n             x:Class=\"Samples.EventsPage\"\n             Title=\"Events\">\n\n    <Grid x:Name=\"LayoutRoot\" Padding=\"12\">\n\n        <Grid.RowDefinitions>\n            <RowDefinition Height=\"*\" />\n            <RowDefinition Height=\"12\" />\n            <RowDefinition Height=\"Auto\" />\n        </Grid.RowDefinitions>\n\n        <ContentView Padding=\"1\" BackgroundColor=\"#B8860B\">\n            <controls:SignaturePadView\n                x:Name=\"signatureView\" StrokeCompleted=\"SignatureChanged\" Cleared=\"SignatureChanged\"\n                CaptionTextColor=\"#B8860B\" ClearTextColor=\"#B8860B\" PromptTextColor=\"#B8860B\"\n                SignatureLineColor=\"#B8860B\" BackgroundColor=\"#FAFAD2\" />\n        </ContentView>\n\n        <Button\n            x:Name=\"btnSave\" Text=\"Save Vector\" Clicked=\"SaveVectorClicked\"\n            HorizontalOptions=\"Start\" VerticalOptions=\"End\" Grid.Row=\"2\" />\n\n        <Button\n            x:Name=\"btnLoad\" Text=\"Load Vector\" Clicked=\"LoadVectorClicked\"\n            HorizontalOptions=\"Center\" VerticalOptions=\"End\" Grid.Row=\"2\" />\n\n        <Button\n            x:Name=\"btnSaveImage\" Text=\"Save Image\" Clicked=\"SaveImageClicked\"\n            HorizontalOptions=\"End\" VerticalOptions=\"End\" Grid.Row=\"2\" />\n\n    </Grid>\n\n</ContentPage>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/EventsPage.xaml.cs",
    "content": "﻿using System;\nusing System.Linq;\nusing Xamarin.Forms;\n\nusing SignaturePad.Forms;\n\nnamespace Samples\n{\n\tpublic partial class EventsPage : ContentPage\n\t{\n\t\tprivate Point[] points;\n\n\t\tpublic EventsPage ()\n\t\t{\n\t\t\tInitializeComponent ();\n\n\t\t\tUpdateControls ();\n\t\t}\n\n\t\tprivate void UpdateControls ()\n\t\t{\n\t\t\tbtnSave.IsEnabled = !signatureView.IsBlank;\n\t\t\tbtnSaveImage.IsEnabled = !signatureView.IsBlank;\n\t\t\tbtnLoad.IsEnabled = points != null;\n\t\t}\n\n\t\tprivate void SaveVectorClicked (object sender, EventArgs e)\n\t\t{\n\t\t\tpoints = signatureView.Points.ToArray ();\n\t\t\tUpdateControls ();\n\n\t\t\tDisplayAlert (\"Signature Pad\", \"Vector signature saved to memory.\", \"OK\");\n\t\t}\n\n\t\tprivate void LoadVectorClicked (object sender, EventArgs e)\n\t\t{\n\t\t\tsignatureView.Points = points;\n\t\t}\n\n\t\tprivate async void SaveImageClicked (object sender, EventArgs e)\n\t\t{\n\t\t\tbool saved;\n\t\t\tusing (var bitmap = await signatureView.GetImageStreamAsync (SignatureImageFormat.Png, Color.Black, Color.White, 1f))\n\t\t\t{\n\t\t\t\tsaved = await App.SaveSignature (bitmap, \"signature.png\");\n\t\t\t}\n\n\t\t\tif (saved)\n\t\t\t\tawait DisplayAlert (\"Signature Pad\", \"Raster signature saved to the photo library.\", \"OK\");\n\t\t\telse\n\t\t\t\tawait DisplayAlert (\"Signature Pad\", \"There was an error saving the signature.\", \"OK\");\n\t\t}\n\n\t\tprivate void SignatureChanged (object sender, EventArgs e)\n\t\t{\n\t\t\tUpdateControls ();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/Helpers/CaptureSignatureBehaviorBase.cs",
    "content": "﻿using System;\nusing Xamarin.Forms;\n\nusing SignaturePad.Forms;\n\nnamespace Samples\n{\n\tpublic class CaptureSignatureBehaviorBase : Behavior<SignaturePadView>\n\t{\n\t\tprivate bool updating;\n\t\tprivate SignaturePadView associated;\n\n\t\tprotected override void OnAttachedTo (SignaturePadView bindable)\n\t\t{\n\t\t\tbase.OnAttachedTo (bindable);\n\n\t\t\tassociated = bindable;\n\t\t\tUpdateBindingContext (bindable, EventArgs.Empty);\n\n\t\t\tbindable.Cleared += OnSignatureChanged;\n\t\t\tbindable.StrokeCompleted += OnSignatureChanged;\n\t\t\tbindable.BindingContextChanged += UpdateBindingContext;\n\t\t}\n\n\t\tprotected override void OnDetachingFrom (SignaturePadView bindable)\n\t\t{\n\t\t\tbindable.Cleared -= OnSignatureChanged;\n\t\t\tbindable.StrokeCompleted -= OnSignatureChanged;\n\t\t\tbindable.BindingContextChanged -= UpdateBindingContext;\n\n\t\t\tBindingContext = null;\n\t\t\tassociated = null;\n\n\t\t\tbase.OnDetachingFrom (bindable);\n\t\t}\n\n\t\tprotected virtual void UpdateSignaturePad (SignaturePadView bindable, BindableProperty property, object oldValue, object newValue)\n\t\t{\n\t\t}\n\n\t\tprotected virtual void UpdateBehavior (SignaturePadView signaturePad)\n\t\t{\n\t\t}\n\n\t\tprotected void OnPropertyChanged (BindableObject bindable, BindableProperty property, object oldValue, object newValue)\n\t\t{\n\t\t\tvar behavior = bindable as CaptureSignatureBehaviorBase;\n\n\t\t\tif (!behavior.updating)\n\t\t\t{\n\t\t\t\tbehavior.updating = true;\n\t\t\t\tbehavior.UpdateSignaturePad (behavior.associated, property, oldValue, newValue);\n\t\t\t\tbehavior.updating = false;\n\t\t\t}\n\t\t}\n\n\t\tprivate void UpdateBindingContext (object sender, EventArgs e)\n\t\t{\n\t\t\tvar signaturePad = sender as SignaturePadView;\n\n\t\t\tBindingContext = signaturePad.BindingContext;\n\t\t}\n\n\t\tprivate void OnSignatureChanged (object sender, EventArgs e)\n\t\t{\n\t\t\tvar signaturePad = sender as SignaturePadView;\n\n\t\t\tif (!updating)\n\t\t\t{\n\t\t\t\tupdating = true;\n\t\t\t\tUpdateBehavior (signaturePad);\n\t\t\t\tupdating = false;\n\t\t\t}\n\t\t}\n\n\t\tpublic static BindableProperty.BindingPropertyChangedDelegate CreatePropertyChanged (BindableProperty property)\n\t\t{\n\t\t\treturn OnPropertyChanged;\n\n\t\t\tvoid OnPropertyChanged (BindableObject bindable, object oldValue, object newValue)\n\t\t\t{\n\t\t\t\tvar behavior = bindable as CaptureSignatureBehaviorBase;\n\t\t\t\tbehavior.OnPropertyChanged (bindable, property, oldValue, newValue);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/Helpers/CaptureSignaturePointsBehavior.cs",
    "content": "﻿using System.Collections.Generic;\nusing Xamarin.Forms;\n\nusing SignaturePad.Forms;\n\nnamespace Samples\n{\n\tpublic class CaptureSignaturePointsBehavior : CaptureSignatureBehaviorBase\n\t{\n\t\tpublic static readonly BindableProperty PointsProperty = BindableProperty.Create (\n\t\t\tnameof (Points),\n\t\t\ttypeof (IEnumerable<Point>),\n\t\t\ttypeof (CaptureSignaturePointsBehavior),\n\t\t\tdefault (IEnumerable<Point>),\n\t\t\tBindingMode.TwoWay,\n\t\t\tpropertyChanged: CreatePropertyChanged (PointsProperty));\n\n\t\tpublic IEnumerable<Point> Points\n\t\t{\n\t\t\tget => (IEnumerable<Point>)GetValue (PointsProperty);\n\t\t\tset => SetValue (PointsProperty, value);\n\t\t}\n\n\t\tprotected override void UpdateSignaturePad (SignaturePadView bindable, BindableProperty property, object oldValue, object newValue)\n\t\t{\n\t\t\tbindable.Points = newValue as IEnumerable<Point>;\n\t\t}\n\n\t\tprotected override void UpdateBehavior (SignaturePadView signaturePad)\n\t\t{\n\t\t\tPoints = signaturePad.Points;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/Helpers/CaptureSignatureStrokesBehavior.cs",
    "content": "﻿using System.Collections.Generic;\nusing Xamarin.Forms;\n\nusing SignaturePad.Forms;\n\nnamespace Samples\n{\n\tpublic class CaptureSignatureStrokesBehavior : CaptureSignatureBehaviorBase\n\t{\n\t\tpublic static readonly BindableProperty StrokesProperty = BindableProperty.Create (\n\t\t\tnameof (Strokes),\n\t\t\ttypeof (IEnumerable<IEnumerable<Point>>),\n\t\t\ttypeof (CaptureSignatureStrokesBehavior),\n\t\t\tdefault (IEnumerable<IEnumerable<Point>>),\n\t\t\tBindingMode.TwoWay,\n\t\t\tpropertyChanged: CreatePropertyChanged (StrokesProperty));\n\n\t\tpublic IEnumerable<IEnumerable<Point>> Strokes\n\t\t{\n\t\t\tget => (IEnumerable<IEnumerable<Point>>)GetValue (StrokesProperty);\n\t\t\tset => SetValue (StrokesProperty, value);\n\t\t}\n\n\t\tprotected override void UpdateSignaturePad (SignaturePadView bindable, BindableProperty property, object oldValue, object newValue)\n\t\t{\n\t\t\tbindable.Strokes = newValue as IEnumerable<IEnumerable<Point>>;\n\t\t}\n\n\t\tprotected override void UpdateBehavior (SignaturePadView signaturePad)\n\t\t{\n\t\t\tStrokes = signaturePad.Strokes;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/Helpers/NotConverter.cs",
    "content": "﻿using System;\nusing System.Globalization;\nusing Xamarin.Forms;\n\nnamespace Samples\n{\n\tpublic class NotConverter : IValueConverter\n\t{\n\t\tpublic object Convert (object value, Type targetType, object parameter, CultureInfo culture)\n\t\t{\n\t\t\treturn Equals (value, false);\n\t\t}\n\n\t\tpublic object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)\n\t\t{\n\t\t\treturn Equals (value, false);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/MainPage.xaml",
    "content": "﻿<TabbedPage xmlns=\"http://xamarin.com/schemas/2014/forms\"\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n             xmlns:local=\"clr-namespace:Samples\"\n             x:Class=\"Samples.MainPage\"\n             Title=\"Signature Pad\">\n\n    <local:EventsPage Title=\"Events\" />\n\n    <local:BindingPage Title=\"Data Binding\" />\n\n</TabbedPage>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/MainPage.xaml.cs",
    "content": "﻿using Xamarin.Forms;\n\nnamespace Samples\n{\n\tpublic partial class MainPage : TabbedPage\n\t{\n\t\tpublic MainPage ()\n\t\t{\n\t\t\tInitializeComponent ();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples/Samples.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>netstandard1.4</TargetFramework>\n    <RootNamespace>Samples</RootNamespace>\n    <AssemblyName>Samples</AssemblyName>\n  </PropertyGroup>\n\n  <PropertyGroup Condition=\" '$(Configuration)' == 'Debug' \">\n    <DebugType>full</DebugType>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\..\\src\\SignaturePad.Forms\\SignaturePad.Forms.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n  </ItemGroup>\n\n</Project>"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/MainActivity.cs",
    "content": "﻿using System.IO;\nusing System.Threading.Tasks;\nusing Android.App;\nusing Android.Content.PM;\nusing Android.OS;\nusing Xamarin.Forms;\nusing Xamarin.Forms.Platform.Android;\n\nnamespace Samples.Droid\n{\n\t[Activity (MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]\n\tpublic class MainActivity : FormsAppCompatActivity\n\t{\n\t\tprotected override void OnCreate (Bundle bundle)\n\t\t{\n\t\t\t// set the layout resources first\n\t\t\tToolbarResource = Resource.Layout.toolbar;\n\t\t\tTabLayoutResource = Resource.Layout.tabs;\n\n\t\t\t// then call base.OnCreate and the Xamarin.Forms methods\n\t\t\tbase.OnCreate (bundle);\n\t\t\tForms.Init (this, bundle);\n\t\t\tLoadApplication (new App (OnSaveSignature));\n\t\t}\n\n\t\tprivate async Task<bool> OnSaveSignature (Stream bitmap, string filename)\n\t\t{\n\t\t\tvar path = Environment.GetExternalStoragePublicDirectory (Environment.DirectoryPictures).AbsolutePath;\n\t\t\tvar file = Path.Combine (path, \"signature.png\");\n\n\t\t\tusing (var dest = File.OpenWrite (file))\n\t\t\t{\n\t\t\t\tawait bitmap.CopyToAsync (dest);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Properties/AndroidManifest.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" android:versionCode=\"1\" android:versionName=\"1.0\" package=\"com.xamarin.signaturepad.forms\" android:installLocation=\"auto\">\n\t<uses-sdk android:minSdkVersion=\"15\" />\n\t<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n\t<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\n\t<application android:label=\"@string/app_name\" android:icon=\"@drawable/ic_launcher\" android:theme=\"@style/MyTheme\"></application>\n</manifest>"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing Android.App;\n\n\n[assembly: AssemblyTitle(\"Samples.Android\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"Samples.Android\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Resources/layout/tabs.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<android.support.design.widget.TabLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/sliding_tabs\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"?attr/colorPrimary\"\n    android:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\"\n    app:tabIndicatorColor=\"@android:color/white\"\n    app:tabGravity=\"fill\"\n    app:tabMode=\"fixed\" />\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Resources/layout/toolbar.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<android.support.v7.widget.Toolbar\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/toolbar\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"?attr/actionBarSize\"\n    android:minHeight=\"?attr/actionBarSize\"\n    android:background=\"?attr/colorPrimary\"\n    android:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\"\n    app:popupTheme=\"@style/ThemeOverlay.AppCompat.Light\"\n    app:layout_scrollFlags=\"scroll|enterAlways\" />\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Resources/values/colors.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<resources>\n  <color name=\"primary\">#2196F3</color>\n  <color name=\"primaryDark\">#1976D2</color>\n  <color name=\"accent\">#FFC107</color>\n  <color name=\"window_background\">#F5F5F5</color>\n</resources>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Resources/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\t<string name=\"app_name\">Signature Pad</string>\n</resources>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Resources/values/style.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<resources>\n  <style name=\"MyTheme\" parent=\"MyTheme.Base\">\n  </style>\n  <style name=\"MyTheme.Base\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n    <item name=\"colorPrimary\">@color/primary</item>\n    <item name=\"colorPrimaryDark\">@color/primaryDark</item>\n    <item name=\"colorAccent\">@color/accent</item>\n    <item name=\"android:windowBackground\">@color/window_background</item>\n    <item name=\"windowActionModeOverlay\">true</item>\n  </style>\n</resources>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Resources/values-v21/style.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<resources>\n  <style name=\"MyTheme\" parent=\"MyTheme.Base\">\n    <!--If you are using MasterDetailPage you will want to set these, else you can leave them out-->\n    <!--<item name=\"android:windowDrawsSystemBarBackgrounds\">true</item>\n    <item name=\"android:statusBarColor\">@android:color/transparent</item>-->\n  </style>\n</resources>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.Android/Samples.Android.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{3AC4ED82-3D1E-4767-8C17-39EF6337AA64}</ProjectGuid>\n    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Samples.Droid</RootNamespace>\n    <AssemblyName>Samples.Android</AssemblyName>\n    <FileAlignment>512</FileAlignment>\n    <AndroidApplication>true</AndroidApplication>\n    <AndroidResgenFile>Resources\\Resource.Designer.cs</AndroidResgenFile>\n    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>\n    <AndroidManifest>Properties\\AndroidManifest.xml</AndroidManifest>\n    <TargetFrameworkVersion>v7.1</TargetFrameworkVersion>\n    <AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <AndroidLinkMode>None</AndroidLinkMode>\n    <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>\n    <AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>\n    <AndroidSupportedAbis>armeabi-v7a,x86</AndroidSupportedAbis>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"Mono.Android\" />\n    <Reference Include=\"mscorlib\" />\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\..\\src\\SignaturePad.Android\\SignaturePad.Android.csproj\">\n      <Project>{f1a16cb9-a759-42c8-8f0b-3c9698a55336}</Project>\n      <Name>SignaturePad.Android</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\..\\..\\src\\SignaturePad.Forms.Droid\\SignaturePad.Forms.Droid.csproj\">\n      <Project>{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}</Project>\n      <Name>SignaturePad.Forms.Droid</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\Samples\\Samples.csproj\">\n      <Project>{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}</Project>\n      <Name>Samples</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"MainActivity.cs\" />\n    <Compile Include=\"Resources\\Resource.Designer.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <AndroidResource Include=\"Resources\\drawable\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-hdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-ldpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-mdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-xhdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-xxhdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\drawable-xxxhdpi\\ic_launcher.png\" />\n    <AndroidResource Include=\"Resources\\values\\colors.xml\" />\n    <AndroidResource Include=\"Resources\\values\\style.xml\" />\n    <AndroidResource Include=\"Resources\\values-v21\\style.xml\" />\n    <AndroidResource Include=\"Resources\\values\\strings.xml\" />\n    <AndroidResource Include=\"Resources\\layout\\tabs.xml\" />\n    <AndroidResource Include=\"Resources\\layout\\toolbar.xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"Properties\\AndroidManifest.xml\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildExtensionsPath)\\Xamarin\\Android\\Xamarin.Android.CSharp.targets\" />\n</Project>"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/App.xaml",
    "content": "﻿<Application\n    x:Class=\"Samples.UWP.App\"\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n    xmlns:local=\"using:Samples.UWP\"\n    RequestedTheme=\"Light\">\n\n</Application>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/App.xaml.cs",
    "content": "﻿using System;\nusing Windows.ApplicationModel;\nusing Windows.ApplicationModel.Activation;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Controls;\nusing Windows.UI.Xaml.Navigation;\n\nnamespace Samples.UWP\n{\n\t/// <summary>\n\t/// Provides application-specific behavior to supplement the default Application class.\n\t/// </summary>\n\tsealed partial class App : Application\n\t{\n\t\t/// <summary>\n\t\t/// Initializes the singleton application object.  This is the first line of authored code\n\t\t/// executed, and as such is the logical equivalent of main() or WinMain().\n\t\t/// </summary>\n\t\tpublic App ()\n\t\t{\n\t\t\tthis.InitializeComponent ();\n\t\t\tthis.Suspending += OnSuspending;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Invoked when the application is launched normally by the end user.  Other entry points\n\t\t/// will be used such as when the application is launched to open a specific file.\n\t\t/// </summary>\n\t\t/// <param name=\"e\">Details about the launch request and process.</param>\n\t\tprotected override void OnLaunched (LaunchActivatedEventArgs e)\n\t\t{\n\n#if DEBUG\n\t\t\tif (System.Diagnostics.Debugger.IsAttached)\n\t\t\t{\n\t\t\t\tthis.DebugSettings.EnableFrameRateCounter = true;\n\t\t\t}\n#endif\n\n\t\t\tFrame rootFrame = Window.Current.Content as Frame;\n\n\t\t\t// Do not repeat app initialization when the Window already has content,\n\t\t\t// just ensure that the window is active\n\t\t\tif (rootFrame == null)\n\t\t\t{\n\t\t\t\t// Create a Frame to act as the navigation context and navigate to the first page\n\t\t\t\trootFrame = new Frame ();\n\n\t\t\t\trootFrame.NavigationFailed += OnNavigationFailed;\n\n\t\t\t\tXamarin.Forms.Forms.Init (e);\n\n\t\t\t\tif (e.PreviousExecutionState == ApplicationExecutionState.Terminated)\n\t\t\t\t{\n\t\t\t\t\t//TODO: Load state from previously suspended application\n\t\t\t\t}\n\n\t\t\t\t// Place the frame in the current Window\n\t\t\t\tWindow.Current.Content = rootFrame;\n\t\t\t}\n\n\t\t\tif (rootFrame.Content == null)\n\t\t\t{\n\t\t\t\t// When the navigation stack isn't restored navigate to the first page,\n\t\t\t\t// configuring the new page by passing required information as a navigation\n\t\t\t\t// parameter\n\t\t\t\trootFrame.Navigate (typeof (MainPage), e.Arguments);\n\t\t\t}\n\t\t\t// Ensure the current window is active\n\t\t\tWindow.Current.Activate ();\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Invoked when Navigation to a certain page fails\n\t\t/// </summary>\n\t\t/// <param name=\"sender\">The Frame which failed navigation</param>\n\t\t/// <param name=\"e\">Details about the navigation failure</param>\n\t\tprivate void OnNavigationFailed (object sender, NavigationFailedEventArgs e)\n\t\t{\n\t\t\tthrow new Exception (\"Failed to load Page \" + e.SourcePageType.FullName);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Invoked when application execution is being suspended.  Application state is saved\n\t\t/// without knowing whether the application will be terminated or resumed with the contents\n\t\t/// of memory still intact.\n\t\t/// </summary>\n\t\t/// <param name=\"sender\">The source of the suspend request.</param>\n\t\t/// <param name=\"e\">Details about the suspend request.</param>\n\t\tprivate void OnSuspending (object sender, SuspendingEventArgs e)\n\t\t{\n\t\t\tvar deferral = e.SuspendingOperation.GetDeferral ();\n\t\t\t//TODO: Save application state and stop any background activity\n\t\t\tdeferral.Complete ();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/MainPage.xaml",
    "content": "﻿<forms:WindowsPage\n    x:Class=\"Samples.UWP.MainPage\"\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:forms=\"using:Xamarin.Forms.Platform.UWP\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n    xmlns:local=\"using:Samples.UWP\"\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n    mc:Ignorable=\"d\"\n    Background=\"{ThemeResource ApplicationPageBackgroundThemeBrush}\">\n\n    <Grid Background=\"{ThemeResource ApplicationPageBackgroundThemeBrush}\">\n\n    </Grid>\n</forms:WindowsPage>"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/MainPage.xaml.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Threading.Tasks;\nusing Windows.Storage;\n\nnamespace Samples.UWP\n{\n\tpublic sealed partial class MainPage\n\t{\n\t\tpublic MainPage ()\n\t\t{\n\t\t\tInitializeComponent ();\n\n\t\t\tLoadApplication (new Samples.App (OnSaveSignature));\n\t\t}\n\n\t\tprivate async Task<bool> OnSaveSignature (Stream bitmap, string filename)\n\t\t{\n\t\t\tvar storageFolder = await KnownFolders.GetFolderForUserAsync (null, KnownFolderId.PicturesLibrary);\n\t\t\tvar file = await storageFolder.CreateFileAsync (filename, CreationCollisionOption.ReplaceExisting);\n\n\t\t\tusing (var stream = await file.OpenAsync (FileAccessMode.ReadWrite))\n\t\t\tusing (var dest = stream.AsStreamForWrite ())\n\t\t\t{\n\t\t\t\tawait bitmap.CopyToAsync (dest);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/Package.appxmanifest",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\" xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\" IgnorableNamespaces=\"uap mp\">\n  <Identity Name=\"9c3e7782-3302-4a18-98ab-056b82b88450\" Publisher=\"CN=Xamarin\" Version=\"1.0.0.0\" />\n  <mp:PhoneIdentity PhoneProductId=\"9c3e7782-3302-4a18-98ab-056b82b88450\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\" />\n  <Properties>\n    <DisplayName>Signature Pad</DisplayName>\n    <PublisherDisplayName>Xamarin</PublisherDisplayName>\n    <Logo>Assets\\StoreLogo.png</Logo>\n  </Properties>\n  <Dependencies>\n    <TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.0.0\" MaxVersionTested=\"10.0.0.0\" />\n  </Dependencies>\n  <Resources>\n    <Resource Language=\"x-generate\" />\n  </Resources>\n  <Applications>\n    <Application Id=\"App\" Executable=\"$targetnametoken$.exe\" EntryPoint=\"Samples.UWP.App\">\n      <uap:VisualElements DisplayName=\"Signature Pad\" Square150x150Logo=\"Assets\\Square150x150Logo.png\" Square44x44Logo=\"Assets\\Square44x44Logo.png\" Description=\"Signature Pad makes capturing, saving, and displaying signatures extremely simple.\" BackgroundColor=\"transparent\">\n        <uap:DefaultTile Wide310x150Logo=\"Assets\\Wide310x150Logo.png\" Square310x310Logo=\"Assets\\LargeTile.png\" Square71x71Logo=\"Assets\\SmallTile.png\" ShortName=\"Signature Pad\">\n          <uap:ShowNameOnTiles>\n            <uap:ShowOn Tile=\"square310x310Logo\" />\n          </uap:ShowNameOnTiles>\n        </uap:DefaultTile>\n        <uap:SplashScreen Image=\"Assets\\SplashScreen.png\" BackgroundColor=\"transparent\" />\n      </uap:VisualElements>\n    </Application>\n  </Applications>\n  <Capabilities>\n    <uap:Capability Name=\"picturesLibrary\" />\n  </Capabilities>\n</Package>"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"Samples.UWP\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"Samples.UWP\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n[assembly: ComVisible(false)]"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/Properties/Default.rd.xml",
    "content": "<!--\n    This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most\n    developers. However, you can modify these parameters to modify the behavior of the .NET Native\n    optimizer.\n\n    Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919\n\n    To fully enable reflection for App1.MyClass and all of its public/private members\n    <Type Name=\"App1.MyClass\" Dynamic=\"Required All\"/>\n\n    To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32\n    <TypeInstantiation Name=\"App1.AppClass\" Arguments=\"System.Int32\" Activate=\"Required Public\" />\n\n    Using the Namespace directive to apply reflection policy to all the types in a particular namespace\n    <Namespace Name=\"DataClasses.ViewModels\" Seralize=\"All\" />\n-->\n\n<Directives xmlns=\"http://schemas.microsoft.com/netfx/2013/01/metadata\">\n  <Application>\n    <!--\n      An Assembly element with Name=\"*Application*\" applies to all assemblies in\n      the application package. The asterisks are not wildcards.\n    -->\n    <Assembly Name=\"*Application*\" Dynamic=\"Required All\" />\n    \n    \n    <!-- Add your application specific runtime directives here. -->\n\n\n  </Application>\n</Directives>"
  },
  {
    "path": "samples/Sample.Forms/Samples.UWP/Samples.UWP.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"14.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">x86</Platform>\n    <ProjectGuid>{DDFB13E8-92EC-4F6F-AAEF-90A71F12812E}</ProjectGuid>\n    <OutputType>AppContainerExe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Samples.UWP</RootNamespace>\n    <AssemblyName>Samples.UWP</AssemblyName>\n    <DefaultLanguage>en-US</DefaultLanguage>\n    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>\n    <TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>\n    <TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>\n    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>\n    <EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>\n    <FileAlignment>512</FileAlignment>\n    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <PackageCertificateKeyFile>Samples.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>\n    <PackageCertificateThumbprint>5D80C6709564B0BBADBD1B115AFCADCB0B9307AB</PackageCertificateThumbprint>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|ARM'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\ARM\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>full</DebugType>\n    <PlatformTarget>ARM</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|ARM'\">\n    <OutputPath>bin\\ARM\\Release\\</OutputPath>\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <Optimize>true</Optimize>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>ARM</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x64'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\x64\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>full</DebugType>\n    <PlatformTarget>x64</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x64'\">\n    <OutputPath>bin\\x64\\Release\\</OutputPath>\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <Optimize>true</Optimize>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>x64</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\x86\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>full</DebugType>\n    <PlatformTarget>x86</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\n    <OutputPath>bin\\x86\\Release\\</OutputPath>\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <Optimize>true</Optimize>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>x86</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>\n  </PropertyGroup>\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NETCore.UniversalWindowsPlatform\" Version=\"6.0.8\" />\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n    <PackageReference Include=\"Win2D.uwp\" Version=\"1.21.0\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"Samples.UWP_TemporaryKey.pfx\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"App.xaml.cs\">\n      <DependentUpon>App.xaml</DependentUpon>\n    </Compile>\n    <Compile Include=\"MainPage.xaml.cs\">\n      <DependentUpon>MainPage.xaml</DependentUpon>\n    </Compile>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <AppxManifest Include=\"Package.appxmanifest\">\n      <SubType>Designer</SubType>\n    </AppxManifest>\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Assets\\LargeTile.scale-100.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-125.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-150.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-200.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-400.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-100.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-125.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-150.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-200.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-400.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-100.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-125.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-150.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-200.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-400.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-100.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-125.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-150.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-200.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-400.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-16.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-24.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-256.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-32.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-48.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-100.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-125.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-150.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-200.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-400.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-16.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-24.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-256.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-32.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-48.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-100.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-125.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-150.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-200.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-400.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-100.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-125.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-150.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-200.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-400.png\" />\n    <Content Include=\"Properties\\Default.rd.xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ApplicationDefinition Include=\"App.xaml\">\n      <Generator>MSBuild:Compile</Generator>\n      <SubType>Designer</SubType>\n    </ApplicationDefinition>\n    <Page Include=\"MainPage.xaml\">\n      <Generator>MSBuild:Compile</Generator>\n      <SubType>Designer</SubType>\n    </Page>\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\..\\src\\SignaturePad.Forms.UWP\\SignaturePad.Forms.UWP.csproj\">\n      <Project>{6fc62387-6717-4577-a48b-d15848741f08}</Project>\n      <Name>SignaturePad.Forms.UWP</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\..\\..\\src\\SignaturePad.UWP\\SignaturePad.UWP.csproj\">\n      <Project>{16131fdc-d50b-4ef2-8ecc-661184ff80db}</Project>\n      <Name>SignaturePad.UWP</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\Samples\\Samples.csproj\">\n      <Project>{cc18e151-5792-4da5-ade6-7cfba16a593e}</Project>\n      <Name>Samples</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <PropertyGroup Condition=\" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' \">\n    <VisualStudioVersion>14.0</VisualStudioVersion>\n  </PropertyGroup>\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsXaml\\v$(VisualStudioVersion)\\Microsoft.Windows.UI.Xaml.CSharp.targets\" />\n</Project>"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/AppDelegate.cs",
    "content": "﻿using System.IO;\nusing System.Threading.Tasks;\nusing Foundation;\nusing Photos;\nusing UIKit;\nusing Xamarin.Forms;\nusing Xamarin.Forms.Platform.iOS;\n\nnamespace Samples.iOS\n{\n\t[Register (\"AppDelegate\")]\n\tpublic partial class AppDelegate : FormsApplicationDelegate\n\t{\n\t\tpublic override bool FinishedLaunching (UIApplication app, NSDictionary options)\n\t\t{\n\t\t\tForms.Init ();\n\n\t\t\tLoadApplication (new App (OnSaveSignature));\n\n\t\t\treturn base.FinishedLaunching (app, options);\n\t\t}\n\n\t\tprivate async Task<bool> OnSaveSignature (Stream bitmap, string filename)\n\t\t{\n\t\t\tvar tcs = new TaskCompletionSource<bool> ();\n\n\t\t\tUIImage image;\n\t\t\tusing (var data = NSData.FromStream (bitmap))\n\t\t\t{\n\t\t\t\timage = UIImage.LoadFromData (data);\n\t\t\t}\n\n\t\t\tvar status = await PHPhotoLibrary.RequestAuthorizationAsync ();\n\t\t\tif (status == PHAuthorizationStatus.Authorized)\n\t\t\t{\n\t\t\t\timage.SaveToPhotosAlbum ((i, error) =>\n\t\t\t\t{\n\t\t\t\t\timage.Dispose ();\n\n\t\t\t\t\ttcs.TrySetResult (error == null);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttcs.TrySetResult (false);\n\t\t\t}\n\n\t\t\treturn await tcs.Task;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/Entitlements.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n\t<dict>\n\t</dict>\n</plist>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>UIDeviceFamily</key>\n\t<array>\n\t\t<integer>1</integer>\n\t\t<integer>2</integer>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>MinimumOSVersion</key>\n\t<string>8.0</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>Signature Pad</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.xamarin.signaturepad.forms</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>NSMainNibFile</key>\n\t<string></string>\n\t<key>NSMainNibFile~ipad</key>\n\t<string></string>\n\t<key>UIStatusBarHidden~ipad</key>\n\t<true/>\n\t<key>XSAppIconAssets</key>\n\t<string>Resources/Assets.xcassets/AppIcons.appiconset</string>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>NSPhotoLibraryUsageDescription</key>\n\t<string>This app saves signatures in the photo library.</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/LaunchScreen.storyboard",
    "content": "﻿<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"14109\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14088\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Llm-lL-Icb\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xb3-aO-Qok\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" id=\"221\" translatesAutoresizingMaskIntoConstraints=\"NO\" fixedFrame=\"YES\" image=\"gradient.png\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n                                <autoresizingMask key=\"autoresizingMask\" heightSizable=\"YES\" widthSizable=\"YES\"/>\n                            </imageView>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" id=\"222\" translatesAutoresizingMaskIntoConstraints=\"NO\" fixedFrame=\"YES\" image=\"signature-pad-glyph.png\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n                                <autoresizingMask key=\"autoresizingMask\" heightSizable=\"YES\" widthSizable=\"YES\"/>\n                            </imageView>\n                        </subviews>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"signature-pad-glyph.png\" width=\"1024\" height=\"1024\"/>\n        <image name=\"gradient.png\" width=\"2048\" height=\"2048\"/>\n    </resources>\n</document>"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/Main.cs",
    "content": "using System;\nusing UIKit;\n\nnamespace Samples.iOS\n{\n\tpublic class Application\n\t{\n\t\tstatic void Main (string[] args)\n\t\t{\n\t\t\tUIApplication.Main (args, null, \"AppDelegate\");\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/Properties/AssemblyInfo.cs",
    "content": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"Samples.iOS\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"Samples.iOS\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2014\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"72bdc44f-c588-44f3-b6df-9aace7daafdd\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/Resources/Assets.xcassets/AppIcons.appiconset/Contents.json",
    "content": "{\n  \"images\": [\n    {\n      \"scale\": \"2x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-20x20@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-20x20@3x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-29x29@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-29x29@3x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-40x40@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-40x40@3x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"60x60\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-60x60@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"60x60\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-60x60@3x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-20x20@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-20x20@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-29x29@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-29x29@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-40x40@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-40x40@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"76x76\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-76x76@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"76x76\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-76x76@2x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"83.5x83.5\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-83.5x83.5@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"1024x1024\",\n      \"idiom\": \"ios-marketing\",\n      \"filename\": \"ItunesArtwork@2x.png\"\n    }\n  ],\n  \"properties\": {},\n  \"info\": {\n    \"version\": 1,\n    \"author\": \"xcode\"\n  }\n}"
  },
  {
    "path": "samples/Sample.Forms/Samples.iOS/Samples.iOS.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">iPhoneSimulator</Platform>\n    <ProjectGuid>{2142B859-21E9-484D-880A-26AD708569DB}</ProjectGuid>\n    <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <OutputType>Exe</OutputType>\n    <RootNamespace>Samples.iOS</RootNamespace>\n    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>\n    <AssemblyName>SamplesiOS</AssemblyName>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\iPhoneSimulator\\Debug</OutputPath>\n    <DefineConstants>DEBUG</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <ConsolePause>false</ConsolePause>\n    <MtouchArch>x86_64</MtouchArch>\n    <MtouchLink>None</MtouchLink>\n    <MtouchDebug>true</MtouchDebug>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' \">\n    <DebugType>none</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\iPhoneSimulator\\Release</OutputPath>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <MtouchLink>Full</MtouchLink>\n    <MtouchArch>x86_64</MtouchArch>\n    <ConsolePause>false</ConsolePause>\n    <CodesignKey>iPhone Developer</CodesignKey>\n    <CodesignProvision />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|iPhone' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\iPhone\\Debug</OutputPath>\n    <DefineConstants>DEBUG</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <ConsolePause>false</ConsolePause>\n    <MtouchArch>ARM64</MtouchArch>\n    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>\n    <CodesignKey>iPhone Developer</CodesignKey>\n    <MtouchDebug>true</MtouchDebug>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|iPhone' \">\n    <DebugType>none</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\iPhone\\Release</OutputPath>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>\n    <MtouchArch>ARM64</MtouchArch>\n    <ConsolePause>false</ConsolePause>\n    <CodesignKey>iPhone Developer</CodesignKey>\n    <MtouchLink>Full</MtouchLink>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"Xamarin.iOS\" />\n  </ItemGroup>\n  <ItemGroup>\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\..\\src\\SignaturePad.Forms.iOS\\SignaturePad.Forms.iOS.csproj\">\n      <Project>{B12D20AA-0EDF-4903-B385-BB8090848532}</Project>\n      <Name>SignaturePad.Forms.iOS</Name>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\Samples\\Samples.csproj\">\n      <Name>Samples</Name>\n      <Project>{CC18E151-5792-4DA5-ADE6-7CFBA16A593E}</Project>\n    </ProjectReference>\n    <ProjectReference Include=\"..\\..\\..\\src\\SignaturePad.iOS\\SignaturePad.iOS.csproj\">\n      <Project>{BEF71536-787B-431F-AC7F-A6469710D11F}</Project>\n      <Name>SignaturePad.iOS</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Main.cs\" />\n    <Compile Include=\"AppDelegate.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"Info.plist\" />\n    <None Include=\"Entitlements.plist\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Contents.json\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-20x20@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-20x20@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-20x20@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-29x29@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-29x29@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-29x29@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-40x40@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-40x40@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-40x40@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-60x60@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-60x60@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-76x76@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-76x76@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-83.5x83.5@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\ItunesArtwork@2x.png\" Visible=\"False\" />\n  </ItemGroup>\n  <ItemGroup>\n    <BundleResource Include=\"Resources\\signature-pad-glyph.png\" />\n    <BundleResource Include=\"Resources\\gradient.png\" />\n  </ItemGroup>\n  <ItemGroup>\n    <InterfaceDefinition Include=\"LaunchScreen.storyboard\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildExtensionsPath)\\Xamarin\\iOS\\Xamarin.iOS.CSharp.targets\" />\n</Project>"
  },
  {
    "path": "samples/Sample.UWP/App.xaml",
    "content": "﻿<Application\n    x:Class=\"Sample.UWP.App\"\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n    xmlns:local=\"using:Sample.UWP\"\n    RequestedTheme=\"Light\">\n\n</Application>\n"
  },
  {
    "path": "samples/Sample.UWP/App.xaml.cs",
    "content": "﻿using System;\nusing Windows.ApplicationModel;\nusing Windows.ApplicationModel.Activation;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Controls;\nusing Windows.UI.Xaml.Navigation;\n\nnamespace Sample.UWP\n{\n\t/// <summary>\n\t/// Provides application-specific behavior to supplement the default Application class.\n\t/// </summary>\n\tsealed partial class App : Application\n\t{\n\t\t/// <summary>\n\t\t/// Initializes the singleton application object.  This is the first line of authored code\n\t\t/// executed, and as such is the logical equivalent of main() or WinMain().\n\t\t/// </summary>\n\t\tpublic App ()\n\t\t{\n\t\t\tthis.InitializeComponent ();\n\t\t\tthis.Suspending += OnSuspending;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Invoked when the application is launched normally by the end user.  Other entry points\n\t\t/// will be used such as when the application is launched to open a specific file.\n\t\t/// </summary>\n\t\t/// <param name=\"e\">Details about the launch request and process.</param>\n\t\tprotected override void OnLaunched (LaunchActivatedEventArgs e)\n\t\t{\n\t\t\tFrame rootFrame = Window.Current.Content as Frame;\n\n\t\t\t// Do not repeat app initialization when the Window already has content,\n\t\t\t// just ensure that the window is active\n\t\t\tif (rootFrame == null)\n\t\t\t{\n\t\t\t\t// Create a Frame to act as the navigation context and navigate to the first page\n\t\t\t\trootFrame = new Frame ();\n\n\t\t\t\trootFrame.NavigationFailed += OnNavigationFailed;\n\n\t\t\t\tif (e.PreviousExecutionState == ApplicationExecutionState.Terminated)\n\t\t\t\t{\n\t\t\t\t\t//TODO: Load state from previously suspended application\n\t\t\t\t}\n\n\t\t\t\t// Place the frame in the current Window\n\t\t\t\tWindow.Current.Content = rootFrame;\n\t\t\t}\n\n\t\t\tif (e.PrelaunchActivated == false)\n\t\t\t{\n\t\t\t\tif (rootFrame.Content == null)\n\t\t\t\t{\n\t\t\t\t\t// When the navigation stack isn't restored navigate to the first page,\n\t\t\t\t\t// configuring the new page by passing required information as a navigation\n\t\t\t\t\t// parameter\n\t\t\t\t\trootFrame.Navigate (typeof (MainPage), e.Arguments);\n\t\t\t\t}\n\t\t\t\t// Ensure the current window is active\n\t\t\t\tWindow.Current.Activate ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Invoked when Navigation to a certain page fails\n\t\t/// </summary>\n\t\t/// <param name=\"sender\">The Frame which failed navigation</param>\n\t\t/// <param name=\"e\">Details about the navigation failure</param>\n\t\tvoid OnNavigationFailed (object sender, NavigationFailedEventArgs e)\n\t\t{\n\t\t\tthrow new Exception (\"Failed to load Page \" + e.SourcePageType.FullName);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Invoked when application execution is being suspended.  Application state is saved\n\t\t/// without knowing whether the application will be terminated or resumed with the contents\n\t\t/// of memory still intact.\n\t\t/// </summary>\n\t\t/// <param name=\"sender\">The source of the suspend request.</param>\n\t\t/// <param name=\"e\">Details about the suspend request.</param>\n\t\tprivate void OnSuspending (object sender, SuspendingEventArgs e)\n\t\t{\n\t\t\tvar deferral = e.SuspendingOperation.GetDeferral ();\n\t\t\t//TODO: Save application state and stop any background activity\n\t\t\tdeferral.Complete ();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.UWP/MainPage.xaml",
    "content": "﻿<Page\n    x:Class=\"Sample.UWP.MainPage\"\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n    xmlns:local=\"using:Sample.UWP\"\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n    xmlns:controls=\"using:Xamarin.Controls\"\n    mc:Ignorable=\"d\">\n\n    <Grid x:Name=\"LayoutRoot\" Padding=\"12\">\n\n        <Grid.RowDefinitions>\n            <RowDefinition Height=\"*\" />\n            <RowDefinition Height=\"12\" />\n            <RowDefinition Height=\"Auto\" />\n        </Grid.RowDefinitions>\n\n        <controls:SignaturePad\n            x:Name=\"signatureView\" StrokeCompleted=\"SignatureChanged\" Cleared=\"SignatureChanged\"\n            CaptionForeground=\"#B8860B\" ClearLabelForeground=\"#B8860B\" SignaturePromptForeground=\"#B8860B\"\n            SignatureLineBrush=\"#B8860B\" Background=\"#FAFAD2\" BorderBrush=\"#B8860B\" BorderThickness=\"1\" />\n\n        <Button\n            x:Name=\"btnSave\" Content=\"Save Vector\" Click=\"SaveVectorClicked\"\n            HorizontalAlignment=\"Left\" VerticalAlignment=\"Bottom\" Grid.Row=\"2\" />\n\n        <Button\n            x:Name=\"btnLoad\" Content=\"Load Vector\" Click=\"LoadVectorClicked\"\n            HorizontalAlignment=\"Center\" VerticalAlignment=\"Bottom\" Grid.Row=\"2\" />\n\n        <Button\n            x:Name=\"btnSaveImage\" Content=\"Save Image\" Click=\"SaveImageClicked\"\n            HorizontalAlignment=\"Right\" VerticalAlignment=\"Bottom\" Grid.Row=\"2\" />\n\n    </Grid>\n\n</Page>\n"
  },
  {
    "path": "samples/Sample.UWP/MainPage.xaml.cs",
    "content": "﻿using System;\nusing System.IO;\nusing Windows.Foundation;\nusing Windows.Storage;\nusing Windows.UI;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Controls;\n\nusing Xamarin.Controls;\n\nnamespace Sample.UWP\n{\n\tpublic sealed partial class MainPage : Page\n\t{\n\t\tprivate Point[] points;\n\n\t\tpublic MainPage ()\n\t\t{\n\t\t\tInitializeComponent ();\n\n\t\t\tUpdateControls ();\n\t\t}\n\n\t\tprivate void UpdateControls ()\n\t\t{\n\t\t\tbtnSave.IsEnabled = !signatureView.IsBlank;\n\t\t\tbtnSaveImage.IsEnabled = !signatureView.IsBlank;\n\t\t\tbtnLoad.IsEnabled = points != null;\n\t\t}\n\n\t\tprivate void SaveVectorClicked (object sender, RoutedEventArgs e)\n\t\t{\n\t\t\tpoints = signatureView.Points;\n\t\t\tUpdateControls ();\n\n\t\t\tvar flyout = new Flyout\n\t\t\t{\n\t\t\t\tContent = new TextBlock\n\t\t\t\t{\n\t\t\t\t\tText = \"Vector signature saved to memory.\"\n\t\t\t\t}\n\t\t\t};\n\t\t\tflyout.ShowAt (btnSave);\n\t\t}\n\n\t\tprivate void LoadVectorClicked (object sender, RoutedEventArgs e)\n\t\t{\n\t\t\tsignatureView.LoadPoints (points);\n\t\t}\n\n\t\tprivate async void SaveImageClicked (object sender, RoutedEventArgs e)\n\t\t{\n\t\t\tvar storageFolder = await KnownFolders.GetFolderForUserAsync (null, KnownFolderId.PicturesLibrary);\n\t\t\tvar file = await storageFolder.CreateFileAsync (\"signature.png\", CreationCollisionOption.ReplaceExisting);\n\n\t\t\tusing (var bitmap = await signatureView.GetImageStreamAsync (SignatureImageFormat.Png, Colors.Black, Colors.White, 1f))\n\t\t\tusing (var stream = await file.OpenAsync (FileAccessMode.ReadWrite))\n\t\t\tusing (var dest = stream.AsStreamForWrite ())\n\t\t\t{\n\t\t\t\tawait bitmap.CopyToAsync (dest);\n\t\t\t}\n\n\t\t\tvar flyout = new Flyout\n\t\t\t{\n\t\t\t\tContent = new TextBlock\n\t\t\t\t{\n\t\t\t\t\tText = \"Raster signature saved to the photo library.\"\n\t\t\t\t}\n\t\t\t};\n\t\t\tflyout.ShowAt (btnSaveImage);\n\t\t}\n\n\t\tprivate void SignatureChanged (object sender, EventArgs e)\n\t\t{\n\t\t\tUpdateControls ();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.UWP/Package.appxmanifest",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\" xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\" IgnorableNamespaces=\"uap mp\">\n  <Identity Name=\"248c9eb2-792b-4f3d-9f8d-a676845f48d7\" Publisher=\"CN=Xamarin\" Version=\"1.0.0.0\" />\n  <mp:PhoneIdentity PhoneProductId=\"248c9eb2-792b-4f3d-9f8d-a676845f48d7\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\" />\n  <Properties>\n    <DisplayName>Signature Pad</DisplayName>\n    <PublisherDisplayName>Xamarin</PublisherDisplayName>\n    <Logo>Assets\\StoreLogo.png</Logo>\n  </Properties>\n  <Dependencies>\n    <TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.0.0\" MaxVersionTested=\"10.0.0.0\" />\n  </Dependencies>\n  <Resources>\n    <Resource Language=\"x-generate\" />\n  </Resources>\n  <Applications>\n    <Application Id=\"App\" Executable=\"$targetnametoken$.exe\" EntryPoint=\"Sample.UWP.App\">\n      <uap:VisualElements DisplayName=\"Signature Pad\" Square150x150Logo=\"Assets\\Square150x150Logo.png\" Square44x44Logo=\"Assets\\Square44x44Logo.png\" Description=\"Signature Pad makes capturing, saving, and displaying signatures extremely simple.\" BackgroundColor=\"transparent\">\n        <uap:DefaultTile Wide310x150Logo=\"Assets\\Wide310x150Logo.png\" Square310x310Logo=\"Assets\\LargeTile.png\" Square71x71Logo=\"Assets\\SmallTile.png\">\n        </uap:DefaultTile>\n        <uap:SplashScreen Image=\"Assets\\SplashScreen.png\" BackgroundColor=\"transparent\" />\n      </uap:VisualElements>\n    </Application>\n  </Applications>\n  <Capabilities>\n    <uap:Capability Name=\"picturesLibrary\" />\n  </Capabilities>\n</Package>"
  },
  {
    "path": "samples/Sample.UWP/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"Sample.UWP\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"Sample.UWP\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2017\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n[assembly: ComVisible(false)]"
  },
  {
    "path": "samples/Sample.UWP/Properties/Default.rd.xml",
    "content": "<!--\n    This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most\n    developers. However, you can modify these parameters to modify the behavior of the .NET Native\n    optimizer.\n\n    Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919\n\n    To fully enable reflection for App1.MyClass and all of its public/private members\n    <Type Name=\"App1.MyClass\" Dynamic=\"Required All\"/>\n\n    To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32\n    <TypeInstantiation Name=\"App1.AppClass\" Arguments=\"System.Int32\" Activate=\"Required Public\" />\n\n    Using the Namespace directive to apply reflection policy to all the types in a particular namespace\n    <Namespace Name=\"DataClasses.ViewModels\" Seralize=\"All\" />\n-->\n\n<Directives xmlns=\"http://schemas.microsoft.com/netfx/2013/01/metadata\">\n  <Application>\n    <!--\n      An Assembly element with Name=\"*Application*\" applies to all assemblies in\n      the application package. The asterisks are not wildcards.\n    -->\n    <Assembly Name=\"*Application*\" Dynamic=\"Required All\" />\n    \n    \n    <!-- Add your application specific runtime directives here. -->\n\n\n  </Application>\n</Directives>"
  },
  {
    "path": "samples/Sample.UWP/Sample.UWP.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">x86</Platform>\n    <ProjectGuid>{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}</ProjectGuid>\n    <OutputType>AppContainerExe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Sample.UWP</RootNamespace>\n    <AssemblyName>Sample.UWP</AssemblyName>\n    <DefaultLanguage>en-US</DefaultLanguage>\n    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>\n    <TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>\n    <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>\n    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>\n    <FileAlignment>512</FileAlignment>\n    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>\n    <PackageCertificateKeyFile>Sample.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>\n    <PackageCertificateThumbprint>032355C46F475E4156F2A934E153675DFA6A111E</PackageCertificateThumbprint>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\x86\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>full</DebugType>\n    <PlatformTarget>x86</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\n    <OutputPath>bin\\x86\\Release\\</OutputPath>\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <Optimize>true</Optimize>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>x86</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|ARM'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\ARM\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>full</DebugType>\n    <PlatformTarget>ARM</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|ARM'\">\n    <OutputPath>bin\\ARM\\Release\\</OutputPath>\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <Optimize>true</Optimize>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>ARM</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x64'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\x64\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>full</DebugType>\n    <PlatformTarget>x64</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x64'\">\n    <OutputPath>bin\\x64\\Release\\</OutputPath>\n    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>\n    <Optimize>true</Optimize>\n    <NoWarn>;2008</NoWarn>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>x64</PlatformTarget>\n    <UseVSHostingProcess>false</UseVSHostingProcess>\n    <ErrorReport>prompt</ErrorReport>\n    <Prefer32Bit>true</Prefer32Bit>\n    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>\n  </PropertyGroup>\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.NETCore.UniversalWindowsPlatform\" Version=\"6.0.8\" />\n    <PackageReference Include=\"Win2D.uwp\" Version=\"1.21.0\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\SignaturePad.UWP\\SignaturePad.UWP.csproj\">\n      <Project>{16131fdc-d50b-4ef2-8ecc-661184ff80db}</Project>\n      <Name>SignaturePad.UWP</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <ApplicationDefinition Include=\"App.xaml\">\n      <Generator>MSBuild:Compile</Generator>\n      <SubType>Designer</SubType>\n    </ApplicationDefinition>\n    <Page Include=\"MainPage.xaml\">\n      <Generator>MSBuild:Compile</Generator>\n      <SubType>Designer</SubType>\n    </Page>\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"App.xaml.cs\">\n      <DependentUpon>App.xaml</DependentUpon>\n    </Compile>\n    <Compile Include=\"MainPage.xaml.cs\">\n      <DependentUpon>MainPage.xaml</DependentUpon>\n    </Compile>\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <AppxManifest Include=\"Package.appxmanifest\" />\n    <None Include=\"Sample.UWP_TemporaryKey.pfx\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Assets\\LargeTile.scale-100.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-125.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-150.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-200.png\" />\n    <Content Include=\"Assets\\LargeTile.scale-400.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-100.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-125.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-150.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-200.png\" />\n    <Content Include=\"Assets\\SmallTile.scale-400.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-100.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-125.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-150.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-200.png\" />\n    <Content Include=\"Assets\\SplashScreen.scale-400.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-100.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-125.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-150.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-200.png\" />\n    <Content Include=\"Assets\\Square150x150Logo.scale-400.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-16.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-24.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-256.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-32.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.altform-unplated_targetsize-48.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-100.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-125.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-150.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-200.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.scale-400.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-16.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-24.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-256.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-32.png\" />\n    <Content Include=\"Assets\\Square44x44Logo.targetsize-48.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-100.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-125.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-150.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-200.png\" />\n    <Content Include=\"Assets\\StoreLogo.scale-400.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-100.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-125.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-150.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-200.png\" />\n    <Content Include=\"Assets\\Wide310x150Logo.scale-400.png\" />\n    <Content Include=\"Properties\\Default.rd.xml\" />\n  </ItemGroup>\n  <PropertyGroup Condition=\" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' \">\n    <VisualStudioVersion>14.0</VisualStudioVersion>\n  </PropertyGroup>\n  <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\WindowsXaml\\v$(VisualStudioVersion)\\Microsoft.Windows.UI.Xaml.CSharp.targets\" />\n</Project>"
  },
  {
    "path": "samples/Sample.UWP/Sample.UWP.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26228.10\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Sample.UWP\", \"Sample.UWP.csproj\", \"{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.UWP\", \"..\\..\\src\\SignaturePad.UWP\\SignaturePad.UWP.csproj\", \"{16131FDC-D50B-4EF2-8ECC-661184FF80DB}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tDebug|ARM = Debug|ARM\n\t\tDebug|x64 = Debug|x64\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease|ARM = Release|ARM\n\t\tRelease|x64 = Release|x64\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|Any CPU.ActiveCfg = Debug|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|Any CPU.Build.0 = Debug|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|Any CPU.Deploy.0 = Debug|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|ARM.ActiveCfg = Debug|ARM\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|ARM.Build.0 = Debug|ARM\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|ARM.Deploy.0 = Debug|ARM\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|x64.Build.0 = Debug|x64\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|x64.Deploy.0 = Debug|x64\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|x86.ActiveCfg = Debug|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|x86.Build.0 = Debug|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Debug|x86.Deploy.0 = Debug|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|Any CPU.ActiveCfg = Release|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|Any CPU.Build.0 = Release|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|Any CPU.Deploy.0 = Release|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|ARM.ActiveCfg = Release|ARM\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|ARM.Build.0 = Release|ARM\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|ARM.Deploy.0 = Release|ARM\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|x64.ActiveCfg = Release|x64\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|x64.Build.0 = Release|x64\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|x64.Deploy.0 = Release|x64\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|x86.ActiveCfg = Release|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|x86.Build.0 = Release|x86\n\t\t{1864E65A-B7F5-49AE-BF54-6A06C5CFD625}.Release|x86.Deploy.0 = Release|x86\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x64.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|x86.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {C5C464A1-5A66-41CD-9338-F56E7C671A9A}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "samples/Sample.iOS/AppDelegate.cs",
    "content": "﻿using Foundation;\nusing UIKit;\n\nnamespace Sample.iOS\n{\n\t[Register (nameof (AppDelegate))]\n\tpublic class AppDelegate : UIApplicationDelegate\n\t{\n\t\tpublic override UIWindow Window { get; set; }\n\n\t\tpublic override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.iOS/Entitlements.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n\t<dict>\n\t</dict>\n</plist>\n"
  },
  {
    "path": "samples/Sample.iOS/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDisplayName</key>\n\t<string>Signature Pad</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.xamarin.signaturepad</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>MinimumOSVersion</key>\n\t<string>9.0</string>\n\t<key>UIDeviceFamily</key>\n\t<array>\n\t\t<integer>1</integer>\n\t\t<integer>2</integer>\n\t</array>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIMainStoryboardFile~ipad</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>NSPhotoLibraryUsageDescription</key>\n\t<string>This app saves signatures in the photo library.</string>\n\t<key>XSAppIconAssets</key>\n\t<string>Resources/Assets.xcassets/AppIcons.appiconset</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/Sample.iOS/LaunchScreen.storyboard",
    "content": "﻿<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"14109\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14088\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Llm-lL-Icb\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xb3-aO-Qok\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" id=\"221\" translatesAutoresizingMaskIntoConstraints=\"NO\" fixedFrame=\"YES\" image=\"gradient.png\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n                                <autoresizingMask key=\"autoresizingMask\" heightSizable=\"YES\" widthSizable=\"YES\"/>\n                            </imageView>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" id=\"222\" translatesAutoresizingMaskIntoConstraints=\"NO\" fixedFrame=\"YES\" image=\"signature-pad-glyph.png\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"736\"/>\n                                <autoresizingMask key=\"autoresizingMask\" heightSizable=\"YES\" widthSizable=\"YES\"/>\n                            </imageView>\n                        </subviews>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"signature-pad-glyph.png\" width=\"1024\" height=\"1024\"/>\n        <image name=\"gradient.png\" width=\"2048\" height=\"2048\"/>\n    </resources>\n</document>"
  },
  {
    "path": "samples/Sample.iOS/Main.cs",
    "content": "﻿using UIKit;\n\nnamespace Sample.iOS\n{\n\tpublic class Application\n\t{\n\t\tstatic void Main (string[] args)\n\t\t{\n\t\t\tUIApplication.Main (args, null, nameof (AppDelegate));\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.iOS/Main.storyboard",
    "content": "﻿<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"14109\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"1010\">\n    <device id=\"retina4_0\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14088\"/>\n        <capability name=\"Constraints to layout margins\" minToolsVersion=\"6.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--Signature Pad-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"ViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"y3c-jy-aDJ\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wfy-db-euE\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"568\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"221\">\n                                <rect key=\"frame\" x=\"16\" y=\"518\" width=\"50\" height=\"30\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" constant=\"50\" id=\"jyI-YM-E1D\"/>\n                                </constraints>\n                                <state key=\"normal\" title=\"Save\"/>\n                                <connections>\n                                    <action selector=\"SaveVectorClicked:\" destination=\"BYZ-38-t0r\" id=\"1751\" eventType=\"touchUpInside\"/>\n                                </connections>\n                            </button>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"222\">\n                                <rect key=\"frame\" x=\"135\" y=\"518\" width=\"50\" height=\"30\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" constant=\"50\" id=\"zQT-ei-vlh\"/>\n                                </constraints>\n                                <state key=\"normal\" title=\"Load\"/>\n                                <connections>\n                                    <action selector=\"LoadVectorClicked:\" destination=\"BYZ-38-t0r\" id=\"1752\" eventType=\"touchUpInside\"/>\n                                </connections>\n                            </button>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"223\">\n                                <rect key=\"frame\" x=\"254\" y=\"518\" width=\"50\" height=\"30\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" constant=\"50\" id=\"8kJ-aw-q55\"/>\n                                </constraints>\n                                <state key=\"normal\" title=\"Export\"/>\n                                <connections>\n                                    <action selector=\"SaveImageClicked:\" destination=\"BYZ-38-t0r\" id=\"1753\" eventType=\"touchUpInside\"/>\n                                </connections>\n                            </button>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"984\" customClass=\"SignaturePadView\">\n                                <rect key=\"frame\" x=\"16\" y=\"84\" width=\"288\" height=\"414\"/>\n                                <color key=\"backgroundColor\" colorSpace=\"calibratedRGB\" red=\"0.98039215686274506\" green=\"0.98039215686274506\" blue=\"0.82352941176470584\" alpha=\"1\"/>\n                                <userDefinedRuntimeAttributes>\n                                    <userDefinedRuntimeAttribute type=\"color\" keyPath=\"SignatureLineColor\">\n                                        <color key=\"value\" colorSpace=\"calibratedRGB\" red=\"0.72156862745098038\" green=\"0.52549019607843139\" blue=\"0.043137254901960784\" alpha=\"1\"/>\n                                    </userDefinedRuntimeAttribute>\n                                    <userDefinedRuntimeAttribute type=\"color\" keyPath=\"CaptionTextColor\">\n                                        <color key=\"value\" colorSpace=\"calibratedRGB\" red=\"0.72156862745098038\" green=\"0.52549019607843139\" blue=\"0.043137254901960784\" alpha=\"1\"/>\n                                    </userDefinedRuntimeAttribute>\n                                    <userDefinedRuntimeAttribute type=\"color\" keyPath=\"SignaturePromptTextColor\">\n                                        <color key=\"value\" colorSpace=\"calibratedRGB\" red=\"0.72156862745098038\" green=\"0.52549019607843139\" blue=\"0.043137254901960784\" alpha=\"1\"/>\n                                    </userDefinedRuntimeAttribute>\n                                    <userDefinedRuntimeAttribute type=\"color\" keyPath=\"ClearLabelTextColor\">\n                                        <color key=\"value\" colorSpace=\"calibratedRGB\" red=\"0.72156862745098038\" green=\"0.52549019607843139\" blue=\"0.043137254901960784\" alpha=\"1\"/>\n                                    </userDefinedRuntimeAttribute>\n                                    <userDefinedRuntimeAttribute type=\"number\" keyPath=\"BackgroundImageContentMode\">\n                                        <integer key=\"value\" value=\"0\"/>\n                                    </userDefinedRuntimeAttribute>\n                                </userDefinedRuntimeAttributes>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"223\" firstAttribute=\"trailing\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"trailingMargin\" id=\"0X9-kl-988\"/>\n                            <constraint firstItem=\"984\" firstAttribute=\"top\" secondItem=\"y3c-jy-aDJ\" secondAttribute=\"bottom\" constant=\"20\" id=\"Eti-ua-whh\"/>\n                            <constraint firstItem=\"222\" firstAttribute=\"centerX\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"centerX\" id=\"Hyj-Lc-Avm\"/>\n                            <constraint firstItem=\"984\" firstAttribute=\"trailing\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"trailingMargin\" id=\"L5j-B6-o8M\"/>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"223\" secondAttribute=\"bottom\" constant=\"20\" id=\"NoE-k8-7xM\"/>\n                            <constraint firstItem=\"221\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leadingMargin\" id=\"SZL-qF-M4q\"/>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"222\" secondAttribute=\"bottom\" constant=\"20\" id=\"kSq-Ow-sWU\"/>\n                            <constraint firstItem=\"984\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leadingMargin\" id=\"uhc-at-a1i\"/>\n                            <constraint firstItem=\"221\" firstAttribute=\"top\" secondItem=\"984\" secondAttribute=\"bottom\" id=\"vCH-Ds-lHY\" constant=\"20\"/>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"221\" secondAttribute=\"bottom\" constant=\"20\" id=\"xio-0R-pRK\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Signature Pad\" id=\"1493\"/>\n                    <connections>\n                        <outlet property=\"btnSave\" destination=\"221\" id=\"name-outlet-221\"/>\n                        <outlet property=\"btnSaveImage\" destination=\"223\" id=\"name-outlet-223\"/>\n                        <outlet property=\"signatureView\" destination=\"984\" id=\"name-outlet-984\"/>\n                        <outlet property=\"btnLoad\" destination=\"222\" id=\"name-outlet-222\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"189.75\" y=\"-90.11268\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"1009\">\n            <objects>\n                <navigationController id=\"1010\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"1012\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"320\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"BYZ-38-t0r\" kind=\"relationship\" relationship=\"rootViewController\" id=\"1494\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"1013\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-222\" y=\"-87\"/>\n        </scene>\n    </scenes>\n</document>"
  },
  {
    "path": "samples/Sample.iOS/Resources/Assets.xcassets/AppIcons.appiconset/Contents.json",
    "content": "{\n  \"images\": [\n    {\n      \"scale\": \"2x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-20x20@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-20x20@3x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-29x29@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-29x29@3x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-40x40@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-40x40@3x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"60x60\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-60x60@2x.png\"\n    },\n    {\n      \"scale\": \"3x\",\n      \"size\": \"60x60\",\n      \"idiom\": \"iphone\",\n      \"filename\": \"Icon-App-60x60@3x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-20x20@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"20x20\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-20x20@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-29x29@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"29x29\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-29x29@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-40x40@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"40x40\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-40x40@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"76x76\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-76x76@1x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"76x76\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-76x76@2x.png\"\n    },\n    {\n      \"scale\": \"2x\",\n      \"size\": \"83.5x83.5\",\n      \"idiom\": \"ipad\",\n      \"filename\": \"Icon-App-83.5x83.5@2x.png\"\n    },\n    {\n      \"scale\": \"1x\",\n      \"size\": \"1024x1024\",\n      \"idiom\": \"ios-marketing\",\n      \"filename\": \"ItunesArtwork@2x.png\"\n    }\n  ],\n  \"properties\": {},\n  \"info\": {\n    \"version\": 1,\n    \"author\": \"xcode\"\n  }\n}"
  },
  {
    "path": "samples/Sample.iOS/Sample.iOS.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">iPhoneSimulator</Platform>\n    <ProjectGuid>{101E3060-8799-4119-8A7A-4F86A01C0C84}</ProjectGuid>\n    <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\n    <TemplateGuid>{edc1b0fa-90cd-4038-8fad-98fe74adb368}</TemplateGuid>\n    <OutputType>Exe</OutputType>\n    <RootNamespace>Sample.iOS</RootNamespace>\n    <AssemblyName>SampleiOS</AssemblyName>\n    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\iPhoneSimulator\\Debug</OutputPath>\n    <DefineConstants>DEBUG</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <ConsolePause>false</ConsolePause>\n    <MtouchArch>x86_64</MtouchArch>\n    <MtouchLink>None</MtouchLink>\n    <MtouchDebug>true</MtouchDebug>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' \">\n    <DebugType>none</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\iPhoneSimulator\\Release</OutputPath>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <MtouchLink>Full</MtouchLink>\n    <MtouchArch>x86_64</MtouchArch>\n    <ConsolePause>false</ConsolePause>\n    <CodesignKey>iPhone Developer</CodesignKey>\n    <CodesignProvision />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|iPhone' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\iPhone\\Debug</OutputPath>\n    <DefineConstants>DEBUG</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <ConsolePause>false</ConsolePause>\n    <MtouchArch>ARM64</MtouchArch>\n    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>\n    <CodesignKey>iPhone Developer</CodesignKey>\n    <MtouchDebug>true</MtouchDebug>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|iPhone' \">\n    <DebugType>none</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\iPhone\\Release</OutputPath>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>\n    <MtouchArch>ARM64</MtouchArch>\n    <ConsolePause>false</ConsolePause>\n    <CodesignKey>iPhone Developer</CodesignKey>\n    <MtouchLink>Full</MtouchLink>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(RunConfiguration)' == 'Default' \">\n    <AppExtensionDebugBundleId />\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"Xamarin.iOS\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\SignaturePad.iOS\\SignaturePad.iOS.csproj\">\n      <Project>{bef71536-787b-431f-ac7f-a6469710d11f}</Project>\n      <Name>SignaturePad.iOS</Name>\n      <IsAppExtension>false</IsAppExtension>\n      <IsWatchApp>false</IsWatchApp>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Contents.json\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-20x20@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-20x20@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-20x20@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-29x29@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-29x29@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-29x29@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-40x40@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-40x40@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-40x40@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-60x60@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-60x60@3x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-76x76@1x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-76x76@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\Icon-App-83.5x83.5@2x.png\" Visible=\"False\" />\n    <ImageAsset Include=\"Resources\\Assets.xcassets\\AppIcons.appiconset\\ItunesArtwork@2x.png\" Visible=\"False\" />\n  </ItemGroup>\n  <ItemGroup>\n    <BundleResource Include=\"Resources\\signature-pad-glyph.png\" />\n    <BundleResource Include=\"Resources\\gradient.png\" />\n  </ItemGroup>\n  <ItemGroup>\n    <InterfaceDefinition Include=\"LaunchScreen.storyboard\" />\n    <InterfaceDefinition Include=\"Main.storyboard\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"Info.plist\" />\n    <None Include=\"Entitlements.plist\" />\n    <ITunesArtwork Include=\"iTunesArtwork\" />\n    <ITunesArtwork Include=\"iTunesArtwork%402x\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Main.cs\" />\n    <Compile Include=\"AppDelegate.cs\" />\n    <Compile Include=\"ViewController.cs\" />\n    <Compile Include=\"ViewController.designer.cs\">\n      <DependentUpon>ViewController.cs</DependentUpon>\n    </Compile>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildExtensionsPath)\\Xamarin\\iOS\\Xamarin.iOS.CSharp.targets\" />\n</Project>"
  },
  {
    "path": "samples/Sample.iOS/Sample.iOS.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.26228.10\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Sample.iOS\", \"Sample.iOS.csproj\", \"{101E3060-8799-4119-8A7A-4F86A01C0C84}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.iOS\", \"..\\..\\src\\SignaturePad.iOS\\SignaturePad.iOS.csproj\", \"{BEF71536-787B-431F-AC7F-A6469710D11F}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tDebug|iPhone = Debug|iPhone\r\n\t\tDebug|iPhoneSimulator = Debug|iPhoneSimulator\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\t\tRelease|iPhone = Release|iPhone\r\n\t\tRelease|iPhoneSimulator = Release|iPhoneSimulator\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Debug|Any CPU.ActiveCfg = Debug|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Debug|Any CPU.Build.0 = Debug|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Debug|iPhone.ActiveCfg = Debug|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Debug|iPhone.Build.0 = Debug|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Release|Any CPU.ActiveCfg = Release|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Release|Any CPU.Build.0 = Release|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Release|iPhone.ActiveCfg = Release|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Release|iPhone.Build.0 = Release|iPhone\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator\r\n\t\t{101E3060-8799-4119-8A7A-4F86A01C0C84}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhone.ActiveCfg = Debug|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhone.Build.0 = Debug|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhone.ActiveCfg = Release|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhone.Build.0 = Release|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU\r\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityGlobals) = postSolution\r\n\t\tSolutionGuid = {C56208F5-7791-4E6D-AACD-288D3363B843}\r\n\tEndGlobalSection\r\n\tGlobalSection(MonoDevelopProperties) = preSolution\r\n\t\tStartupItem = Sample.iOS.csproj\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "samples/Sample.iOS/ViewController.cs",
    "content": "﻿using System;\nusing System.Threading.Tasks;\nusing CoreGraphics;\nusing Foundation;\nusing Photos;\nusing UIKit;\n\nusing Xamarin.Controls;\n\nnamespace Sample.iOS\n{\n\tpublic partial class ViewController : UIViewController\n\t{\n\t\tprivate CGPoint[] points;\n\n\t\tpublic ViewController (IntPtr handle)\n\t\t\t: base (handle)\n\t\t{\n\t\t}\n\n\t\tpublic override void ViewDidLoad ()\n\t\t{\n\t\t\tbase.ViewDidLoad ();\n\n\t\t\tsignatureView.Layer.BorderColor = UIColor.FromRGBA (184, 134, 11, 255).CGColor;\n\t\t\tsignatureView.Layer.BorderWidth = 1f;\n\n\t\t\tsignatureView.StrokeCompleted += (sender, e) => UpdateControls ();\n\t\t\tsignatureView.Cleared += (sender, e) => UpdateControls ();\n\n\t\t\tUpdateControls ();\n\t\t}\n\n\t\tprivate void UpdateControls ()\n\t\t{\n\t\t\tbtnSave.Enabled = !signatureView.IsBlank;\n\t\t\tbtnSaveImage.Enabled = !signatureView.IsBlank;\n\t\t\tbtnLoad.Enabled = points != null;\n\t\t}\n\n\t\tpartial void SaveVectorClicked (UIButton sender)\n\t\t{\n\t\t\tpoints = signatureView.Points;\n\t\t\tUpdateControls ();\n\n\t\t\tShowToast (\"Vector signature saved to memory.\");\n\t\t}\n\n\t\tpartial void LoadVectorClicked (UIButton sender)\n\t\t{\n\t\t\tsignatureView.LoadPoints (points);\n\t\t}\n\n\t\tasync partial void SaveImageClicked (UIButton sender)\n\t\t{\n\t\t\tUIImage image;\n\t\t\tusing (var bitmap = await signatureView.GetImageStreamAsync (SignatureImageFormat.Png, UIColor.Black, UIColor.White, 1f))\n\t\t\tusing (var data = NSData.FromStream (bitmap))\n\t\t\t{\n\t\t\t\timage = UIImage.LoadFromData (data);\n\t\t\t}\n\n\t\t\tvar status = await PHPhotoLibrary.RequestAuthorizationAsync ();\n\t\t\tif (status == PHAuthorizationStatus.Authorized)\n\t\t\t{\n\t\t\t\timage.SaveToPhotosAlbum ((i, error) =>\n\t\t\t\t{\n\t\t\t\t\timage.Dispose ();\n\n\t\t\t\t\tif (error == null)\n\t\t\t\t\t\tShowToast (\"Raster signature saved to the photo library.\");\n\t\t\t\t\telse\n\t\t\t\t\t\tShowToast (\"There was an error saving the signature: \" + error.LocalizedDescription);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tShowToast (\"Permission to save to the photo library was denied.\");\n\t\t\t}\n\t\t}\n\n\t\tprivate async void ShowToast (string message)\n\t\t{\n\t\t\tvar toast = UIAlertController.Create (null, message, UIAlertControllerStyle.Alert);\n\t\t\tawait PresentViewControllerAsync (toast, true);\n\t\t\tawait Task.Delay (1000);\n\t\t\tawait toast.DismissViewControllerAsync (true);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "samples/Sample.iOS/ViewController.designer.cs",
    "content": "﻿// WARNING\n//\n// This file has been generated automatically by Visual Studio from the outlets and\n// actions declared in your storyboard file.\n// Manual changes to this file will not be maintained.\n//\nusing Foundation;\nusing System;\nusing System.CodeDom.Compiler;\nusing UIKit;\n\nnamespace Sample.iOS\n{\n    [Register (\"ViewController\")]\n    partial class ViewController\n    {\n        [Outlet]\n        [GeneratedCode (\"iOS Designer\", \"1.0\")]\n        UIKit.UIButton btnLoad { get; set; }\n\n        [Outlet]\n        [GeneratedCode (\"iOS Designer\", \"1.0\")]\n        UIKit.UIButton btnSave { get; set; }\n\n        [Outlet]\n        [GeneratedCode (\"iOS Designer\", \"1.0\")]\n        UIKit.UIButton btnSaveImage { get; set; }\n\n        [Outlet]\n        [GeneratedCode (\"iOS Designer\", \"1.0\")]\n        Xamarin.Controls.SignaturePadView signatureView { get; set; }\n\n        [Action (\"LoadVectorClicked:\")]\n        [GeneratedCode (\"iOS Designer\", \"1.0\")]\n        partial void LoadVectorClicked (UIKit.UIButton sender);\n\n        [Action (\"SaveImageClicked:\")]\n        [GeneratedCode (\"iOS Designer\", \"1.0\")]\n        partial void SaveImageClicked (UIKit.UIButton sender);\n\n        [Action (\"SaveVectorClicked:\")]\n        [GeneratedCode (\"iOS Designer\", \"1.0\")]\n        partial void SaveVectorClicked (UIKit.UIButton sender);\n\n        void ReleaseDesignerOutlets ()\n        {\n            if (btnLoad != null) {\n                btnLoad.Dispose ();\n                btnLoad = null;\n            }\n\n            if (btnSave != null) {\n                btnSave.Dispose ();\n                btnSave = null;\n            }\n\n            if (btnSaveImage != null) {\n                btnSaveImage.Dispose ();\n                btnSaveImage = null;\n            }\n\n            if (signatureView != null) {\n                signatureView.Dispose ();\n                signatureView = null;\n            }\n        }\n    }\n}"
  },
  {
    "path": "src/SignaturePad.Android/InkPresenter.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Drawing;\nusing System.Linq;\nusing Android.App;\nusing Android.Content;\nusing Android.Graphics;\nusing Android.Runtime;\nusing Android.Util;\nusing Android.Views;\n\nnamespace Xamarin.Controls\n{\n\tpartial class InkPresenter : View\n\t{\n\t\tstatic InkPresenter ()\n\t\t{\n\t\t\t// we may be in a designer\n\t\t\tif (Application.Context == null)\n\t\t\t{\n\t\t\t\tScreenDensity = 1f;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar wndMngr = Application.Context.GetSystemService (Context.WindowService).JavaCast<IWindowManager> ();\n\t\t\tvar dm = new DisplayMetrics ();\n\t\t\twndMngr.DefaultDisplay.GetMetrics (dm);\n\t\t\tScreenDensity = (float)dm.Density;\n\t\t}\n\n\t\tpublic InkPresenter (Context context)\n\t\t\t: base (context)\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tprivate void Initialize ()\n\t\t{\n\t\t}\n\n\t\tpublic override bool OnTouchEvent (MotionEvent e)\n\t\t{\n\t\t\tswitch (e.Action)\n\t\t\t{\n\t\t\t\tcase MotionEventActions.Down:\n\t\t\t\t\tTouchesBegan (e);\n\t\t\t\t\treturn true;\n\t\t\t\tcase MotionEventActions.Move:\n\t\t\t\t\tTouchesMoved (e);\n\t\t\t\t\treturn true;\n\t\t\t\tcase MotionEventActions.Up:\n\t\t\t\t\tTouchesEnded (e);\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tprivate void TouchesBegan (MotionEvent e)\n\t\t{\n\t\t\t// don't allow the event to propagate because we're handling it here\n\t\t\tParent?.RequestDisallowInterceptTouchEvent (true);\n\n\t\t\t// create a new path and set the options\n\t\t\tcurrentPath = new InkStroke (new Path (), new List<System.Drawing.PointF> (), StrokeColor, StrokeWidth);\n\n\t\t\t// obtain the location of the touch\n\t\t\tfloat touchX = e.GetX ();\n\t\t\tfloat touchY = e.GetY ();\n\n\t\t\t// move to the touched point\n\t\t\tcurrentPath.Path.MoveTo (touchX, touchY);\n\t\t\tcurrentPath.GetPoints ().Add (new System.Drawing.PointF (touchX, touchY));\n\n\t\t\t// update the dirty rectangle\n\t\t\tResetBounds (touchX, touchY);\n\t\t\tInvalidate (DirtyRect);\n\t\t}\n\n\t\tprivate void TouchesMoved (MotionEvent e, bool update = true)\n\t\t{\n\t\t\t// something may have happened (clear) so start the stroke again\n\t\t\tif (currentPath == null)\n\t\t\t{\n\t\t\t\tTouchesBegan (e);\n\t\t\t}\n\n\t\t\tvar hasMoved = false;\n\n\t\t\tfor (var i = 0; i < e.HistorySize; i++)\n\t\t\t{\n\t\t\t\tfloat historicalX = e.GetHistoricalX (i);\n\t\t\t\tfloat historicalY = e.GetHistoricalY (i);\n\n\t\t\t\tif (HasMovedFarEnough (currentPath, historicalX, historicalY))\n\t\t\t\t{\n\t\t\t\t\t// update the dirty rectangle\n\t\t\t\t\tUpdateBounds (historicalX, historicalY);\n\t\t\t\t\thasMoved = true;\n\n\t\t\t\t\t// add it to the current path\n\t\t\t\t\tcurrentPath.Path.LineTo (historicalX, historicalY);\n\t\t\t\t\tcurrentPath.GetPoints ().Add (new System.Drawing.PointF (historicalX, historicalY));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfloat touchX = e.GetX ();\n\t\t\tfloat touchY = e.GetY ();\n\n\t\t\tif (HasMovedFarEnough (currentPath, touchX, touchY))\n\t\t\t{\n\t\t\t\t// add it to the current path\n\t\t\t\tcurrentPath.Path.LineTo (touchX, touchY);\n\t\t\t\tcurrentPath.GetPoints ().Add (new System.Drawing.PointF (touchX, touchY));\n\n\t\t\t\t// update the dirty rectangle\n\t\t\t\tUpdateBounds (touchX, touchY);\n\t\t\t\thasMoved = true;\n\t\t\t}\n\n\t\t\tif (update && hasMoved)\n\t\t\t{\n\t\t\t\tInvalidate (DirtyRect);\n\t\t\t}\n\t\t}\n\n\t\tprivate void TouchesEnded (MotionEvent e)\n\t\t{\n\t\t\t// something may have happened (clear) during the stroke\n\t\t\tif (currentPath != null)\n\t\t\t{\n\t\t\t\tTouchesMoved (e, false);\n\n\t\t\t\t// add the current path and points to their respective lists.\n\t\t\t\tvar smoothed = PathSmoothing.SmoothedPathWithGranularity (currentPath, 2);\n\t\t\t\tpaths.Add (smoothed);\n\t\t\t}\n\n\t\t\t// reset the drawing\n\t\t\tcurrentPath = null;\n\n\t\t\t// update the dirty rectangle\n\t\t\tInvalidate (DirtyRect);\n\n\t\t\t// we are done with drawing\n\t\t\tOnStrokeCompleted ();\n\n\t\t\t// allow the event to propagate\n\t\t\tParent?.RequestDisallowInterceptTouchEvent (false);\n\t\t}\n\n\t\tprivate void Invalidate (RectangleF dirtyRect)\n\t\t{\n\t\t\tusing (var rect = new Rect (\n\t\t\t\t(int)(dirtyRect.Left - 0.5f),\n\t\t\t\t(int)(dirtyRect.Top - 0.5f),\n\t\t\t\t(int)(dirtyRect.Right + 0.5f),\n\t\t\t\t(int)(dirtyRect.Bottom + 0.5f)))\n\t\t\t{\n\t\t\t\tInvalidate (rect);\n\t\t\t}\n\t\t}\n\n\t\tprotected override void OnDraw (Canvas canvas)\n\t\t{\n\t\t\tbase.OnDraw (canvas);\n\n\t\t\t// destroy an old bitmap\n\t\t\tif (bitmapBuffer != null && ShouldRedrawBufferImage)\n\t\t\t{\n\t\t\t\tvar temp = bitmapBuffer;\n\t\t\t\tbitmapBuffer = null;\n\n\t\t\t\ttemp.Recycle ();\n\t\t\t\ttemp.Dispose ();\n\t\t\t\ttemp = null;\n\t\t\t}\n\n\t\t\t// re-create\n\t\t\tif (bitmapBuffer == null)\n\t\t\t{\n\t\t\t\tbitmapBuffer = CreateBufferImage ();\n\t\t\t}\n\n\t\t\t// if there are no lines, the the bitmap will be null\n\t\t\tif (bitmapBuffer != null)\n\t\t\t{\n\t\t\t\tcanvas.DrawBitmap (bitmapBuffer, 0, 0, null);\n\t\t\t}\n\n\t\t\t// draw the current path over the old paths\n\t\t\tif (currentPath != null)\n\t\t\t{\n\t\t\t\tusing (var paint = new Paint ())\n\t\t\t\t{\n\t\t\t\t\tpaint.StrokeJoin = Paint.Join.Round;\n\t\t\t\t\tpaint.StrokeCap = Paint.Cap.Round;\n\t\t\t\t\tpaint.AntiAlias = true;\n\t\t\t\t\tpaint.SetStyle (Paint.Style.Stroke);\n\n\t\t\t\t\tpaint.Color = currentPath.Color;\n\t\t\t\t\tpaint.StrokeWidth = currentPath.Width * ScreenDensity;\n\n\t\t\t\t\tcanvas.DrawPath (currentPath.Path, paint);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate Bitmap CreateBufferImage ()\n\t\t{\n\t\t\tif (paths == null || paths.Count == 0)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar size = new SizeF (Width, Height);\n\t\t\tvar image = Bitmap.CreateBitmap ((int)size.Width, (int)size.Height, Bitmap.Config.Argb8888);\n\n\t\t\tusing (var canvas = new Canvas (image))\n\t\t\tusing (var paint = new Paint ())\n\t\t\t{\n\t\t\t\tpaint.StrokeJoin = Paint.Join.Round;\n\t\t\t\tpaint.StrokeCap = Paint.Cap.Round;\n\t\t\t\tpaint.AntiAlias = true;\n\t\t\t\tpaint.SetStyle (Paint.Style.Stroke);\n\n\t\t\t\tforeach (var path in paths)\n\t\t\t\t{\n\t\t\t\t\tpaint.Color = path.Color;\n\t\t\t\t\tpaint.StrokeWidth = path.Width * ScreenDensity;\n\n\t\t\t\t\tcanvas.DrawPath (path.Path, paint);\n\n\t\t\t\t\tpath.IsDirty = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn image;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Android/Resources/drawable/signature_pad_background.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n  <solid android:color=\"@color/signature_pad_light_color\"/>\n</shape>\n"
  },
  {
    "path": "src/SignaturePad.Android/Resources/layout/signature_pad_layout.axml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<merge xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <ImageView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:id=\"@+id/background_image\" />\n    <Xamarin.Controls.SignaturePadCanvasView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:id=\"@+id/signature_canvas\" />\n    <TextView\n        android:text=\"@string/signature_pad_caption_text\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:id=\"@+id/caption\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_alignParentBottom=\"true\"\n        android:includeFontPadding=\"true\"\n        android:textColor=\"@color/signature_pad_dark_color\"\n        android:textSize=\"@dimen/signature_pad_font_size\"\n        android:layout_marginBottom=\"@dimen/signature_pad_narrow_spacing\" />\n    <View\n        android:layout_width=\"match_parent\"\n        android:id=\"@+id/signature_line\"\n        android:layout_above=\"@+id/caption\"\n        android:layout_height=\"@dimen/signature_pad_line_thickness\"\n        android:background=\"@color/signature_pad_dark_color\"\n        android:layout_marginLeft=\"@dimen/signature_pad_wide_spacing\"\n        android:layout_marginRight=\"@dimen/signature_pad_wide_spacing\" />\n    <TextView\n        android:text=\"@string/signature_pad_prompt_text\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:id=\"@+id/signature_prompt\"\n        android:layout_above=\"@+id/signature_line\"\n        android:textStyle=\"bold\"\n        android:textColor=\"@color/signature_pad_dark_color\"\n        android:textSize=\"@dimen/signature_pad_font_size\"\n        android:layout_marginLeft=\"@dimen/signature_pad_wide_spacing\" />\n    <TextView\n        android:text=\"@string/signature_pad_clear_label_text\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:id=\"@+id/clear_label\"\n        android:includeFontPadding=\"true\"\n        android:textColor=\"@color/signature_pad_dark_color\"\n        android:textSize=\"@dimen/signature_pad_font_size\"\n        android:textStyle=\"bold\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_marginRight=\"@dimen/signature_pad_wide_spacing\"\n        android:layout_marginTop=\"@dimen/signature_pad_wide_spacing\" />\n</merge>"
  },
  {
    "path": "src/SignaturePad.Android/Resources/values/attrs.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n  <declare-styleable name=\"SignaturePadView\">\n    <attr name=\"strokeColor\" format=\"color\" />\n    <attr name=\"strokeWidth\" format=\"dimension\" />\n    <attr name=\"signatureLineColor\" format=\"color\" />\n    <attr name=\"signatureLineWidth\" format=\"dimension\" />\n    <attr name=\"signatureLineSpacing\" format=\"dimension\" />\n    <attr name=\"captionText\" format=\"string\" />\n    <attr name=\"captionTextSize\" format=\"dimension\" />\n    <attr name=\"captionTextColor\" format=\"color\" />\n    <attr name=\"signaturePromptText\" format=\"string\" />\n    <attr name=\"signaturePromptTextSize\" format=\"dimension\" />\n    <attr name=\"signaturePromptTextColor\" format=\"color\" />\n    <attr name=\"clearLabelText\" format=\"string\" />\n    <attr name=\"clearLabelTextSize\" format=\"dimension\" />\n    <attr name=\"clearLabelTextColor\" format=\"color\" />\n  </declare-styleable>\n</resources>\n"
  },
  {
    "path": "src/SignaturePad.Android/Resources/values/signature_pad_defaults.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n  <string name=\"signature_pad_clear_label_text\">clear</string>\n  <string name=\"signature_pad_prompt_text\">▶</string>\n  <string name=\"signature_pad_caption_text\">sign above the line</string>\n  <color name=\"signature_pad_light_color\">#FFFFFF</color>\n  <color name=\"signature_pad_dark_color\">#000000</color>\n  <dimen name=\"signature_pad_wide_spacing\">12dip</dimen>\n  <dimen name=\"signature_pad_narrow_spacing\">3dip</dimen>\n  <dimen name=\"signature_pad_line_thickness\">1dip</dimen>\n  <dimen name=\"signature_pad_font_size\">15dip</dimen>\n</resources>\n"
  },
  {
    "path": "src/SignaturePad.Android/SignaturePad.Android.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>monoandroid4.0.3</TargetFramework>\n    <RootNamespace>Xamarin.Controls</RootNamespace>\n    <AssemblyName>SignaturePad</AssemblyName>\n    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>\n    <AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile>\n    <EnableDefaultCompileItems>False</EnableDefaultCompileItems>\n    <DocumentationFile Condition=\" '$(Configuration)' == 'Release' \">bin\\$(Configuration)\\$(AssemblyName).xml</DocumentationFile>\n    <AssemblyVersion>1.0.0</AssemblyVersion>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <Version>1.0.0</Version>\n    <PackageId>Xamarin.Controls.SignaturePad</PackageId>\n    <Title>SignaturePad for Xamarin and Windows</Title>\n    <Product>$(AssemblyName) ($(TargetFramework))</Product>\n    <Authors>Microsoft</Authors>\n    <Owners>Microsoft</Owners>\n    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>\n    <Summary>Makes capturing, saving, and displaying signatures extremely simple.</Summary>\n    <Description>Makes capturing, saving, and displaying signatures extremely simple.</Description>\n    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>\n    <NeutralLanguage>en</NeutralLanguage>\n    <PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=874510</PackageIconUrl>\n    <RepositoryUrl>https://go.microsoft.com/fwlink/?linkid=874507</RepositoryUrl>\n    <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=874507</PackageProjectUrl>\n    <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</PackageLicenseUrl>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</PackageReleaseNotes>\n    <PackageTags>xamarin,signature,handwriting,windows,ios,android,uwp</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"MSBuild.Sdk.Extras\" Version=\"1.4.0\" PrivateAssets=\"All\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <Compile Include=\"*.cs\" />\n    <Compile Include=\"..\\SignaturePad.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n    <Compile Include=\"..\\SignaturePad.InkPresenter.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n    <AndroidResource Include=\"Resources\\**\\*.axml\" />\n    <AndroidResource Include=\"Resources\\**\\*.xml\" />\n  </ItemGroup>\n\n  <Import Project=\"$(MSBuildSDKExtrasTargets)\" Condition=\"Exists('$(MSBuildSDKExtrasTargets)')\" />\n\n</Project>"
  },
  {
    "path": "src/SignaturePad.Android/SignaturePadCanvasView.cs",
    "content": "﻿using System.IO;\nusing System.Threading.Tasks;\nusing Android.Content;\nusing Android.Graphics;\nusing Android.Util;\nusing Android.Views;\nusing Android.Widget;\n\nnamespace Xamarin.Controls\n{\n\tpublic partial class SignaturePadCanvasView : FrameLayout\n\t{\n\t\tprivate InkPresenter inkPresenter;\n\n\t\tpublic SignaturePadCanvasView (Context context)\n\t\t\t: base (context)\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tpublic SignaturePadCanvasView (Context context, IAttributeSet attrs)\n\t\t\t: base (context, attrs)\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tpublic SignaturePadCanvasView (Context context, IAttributeSet attrs, int defStyle)\n\t\t\t: base (context, attrs, defStyle)\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tprivate void Initialize ()\n\t\t{\n\t\t\tinkPresenter = new InkPresenter (Context)\n\t\t\t{\n\t\t\t\tLayoutParameters = new FrameLayout.LayoutParams (FrameLayout.LayoutParams.MatchParent, FrameLayout.LayoutParams.MatchParent)\n\t\t\t};\n\t\t\tinkPresenter.StrokeCompleted += OnStrokeCompleted;\n\t\t\tAddView (inkPresenter);\n\n\t\t\tStrokeWidth = ImageConstructionSettings.DefaultStrokeWidth;\n\t\t\tStrokeColor = ImageConstructionSettings.DefaultStrokeColor;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the color of the strokes for the signature.\n\t\t/// </summary>\n\t\t/// <value>The color of the stroke.</value>\n\t\tpublic Color StrokeColor\n\t\t{\n\t\t\tget { return inkPresenter.StrokeColor; }\n\t\t\tset\n\t\t\t{\n\t\t\t\tinkPresenter.StrokeColor = value;\n\t\t\t\tforeach (var stroke in inkPresenter.GetStrokes ())\n\t\t\t\t{\n\t\t\t\t\tstroke.Color = value;\n\t\t\t\t}\n\t\t\t\tinkPresenter.Invalidate ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the width in pixels of the strokes for the signature.\n\t\t/// </summary>\n\t\t/// <value>The width of the line.</value>\n\t\tpublic float StrokeWidth\n\t\t{\n\t\t\tget { return inkPresenter.StrokeWidth; }\n\t\t\tset\n\t\t\t{\n\t\t\t\tinkPresenter.StrokeWidth = value;\n\t\t\t\tforeach (var stroke in inkPresenter.GetStrokes ())\n\t\t\t\t{\n\t\t\t\t\tstroke.Width = value;\n\t\t\t\t}\n\t\t\t\tinkPresenter.Invalidate ();\n\t\t\t}\n\t\t}\n\n\t\tpublic void Clear ()\n\t\t{\n\t\t\tinkPresenter.Clear ();\n\n\t\t\tOnCleared ();\n\t\t}\n\n\t\tprivate Bitmap GetImageInternal (System.Drawing.SizeF scale, System.Drawing.RectangleF signatureBounds, System.Drawing.SizeF imageSize, float strokeWidth, Color strokeColor, Color backgroundColor)\n\t\t{\n\t\t\t// create bitmap and set the desired options\n\t\t\tvar image = Bitmap.CreateBitmap ((int)imageSize.Width, (int)imageSize.Height, Bitmap.Config.Argb8888);\n\t\t\tusing (var canvas = new Canvas (image))\n\t\t\t{\n\t\t\t\t// background\n\t\t\t\tcanvas.DrawColor (backgroundColor);\n\n\t\t\t\t// cropping / scaling\n\t\t\t\tcanvas.Scale (scale.Width, scale.Height);\n\t\t\t\tcanvas.Translate (-signatureBounds.Left, -signatureBounds.Top);\n\n\t\t\t\t// strokes\n\t\t\t\tusing (var paint = new Paint ())\n\t\t\t\t{\n\t\t\t\t\tpaint.Color = strokeColor;\n\t\t\t\t\tpaint.StrokeWidth = strokeWidth * InkPresenter.ScreenDensity;\n\t\t\t\t\tpaint.StrokeJoin = Paint.Join.Round;\n\t\t\t\t\tpaint.StrokeCap = Paint.Cap.Round;\n\t\t\t\t\tpaint.AntiAlias = true;\n\t\t\t\t\tpaint.SetStyle (Paint.Style.Stroke);\n\n\t\t\t\t\tforeach (var path in inkPresenter.GetStrokes ())\n\t\t\t\t\t{\n\t\t\t\t\t\tcanvas.DrawPath (path.Path, paint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// get the image\n\t\t\treturn image;\n\t\t}\n\n\t\tprivate async Task<Stream> GetImageStreamInternal (SignatureImageFormat format, System.Drawing.SizeF scale, System.Drawing.RectangleF signatureBounds, System.Drawing.SizeF imageSize, float strokeWidth, Color strokeColor, Color backgroundColor)\n\t\t{\n\t\t\tBitmap.CompressFormat bcf;\n\t\t\tif (format == SignatureImageFormat.Jpeg)\n\t\t\t{\n\t\t\t\tbcf = Bitmap.CompressFormat.Jpeg;\n\t\t\t}\n\t\t\telse if (format == SignatureImageFormat.Png)\n\t\t\t{\n\t\t\t\tbcf = Bitmap.CompressFormat.Png;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar image = GetImageInternal (scale, signatureBounds, imageSize, strokeWidth, strokeColor, backgroundColor);\n\t\t\tif (image != null)\n\t\t\t{\n\t\t\t\tusing (image)\n\t\t\t\t{\n\t\t\t\t\tvar stream = new MemoryStream ();\n\t\t\t\t\tvar result = await image.CompressAsync (bcf, 100, stream);\n\n\t\t\t\t\timage.Recycle ();\n\n\t\t\t\t\tif (result)\n\t\t\t\t\t{\n\t\t\t\t\t\tstream.Position = 0;\n\t\t\t\t\t\treturn stream;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\tpublic override bool OnInterceptTouchEvent (MotionEvent ev)\n\t\t{\n\t\t\t// don't accept touch when the view is disabled\n\t\t\tif (!Enabled)\n\t\t\t\treturn true;\n\n\t\t\treturn base.OnInterceptTouchEvent (ev);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Android/SignaturePadView.cs",
    "content": "﻿using System;\nusing Android.Content;\nusing Android.Graphics;\nusing Android.Graphics.Drawables;\nusing Android.Util;\nusing Android.Views;\nusing Android.Widget;\n\nnamespace Xamarin.Controls\n{\n\tpublic partial class SignaturePadView : RelativeLayout\n\t{\n\t\tprivate static Random rnd = new Random ();\n\n\t\tpublic SignaturePadView (Context context)\n\t\t\t: base (context)\n\t\t{\n\t\t\tInitialize (null);\n\t\t}\n\n\t\tpublic SignaturePadView (Context context, IAttributeSet attrs)\n\t\t\t: base (context, attrs)\n\t\t{\n\t\t\tInitialize (attrs);\n\t\t}\n\n\t\tpublic SignaturePadView (Context context, IAttributeSet attrs, int defStyle)\n\t\t\t: base (context, attrs, defStyle)\n\t\t{\n\t\t\tInitialize (attrs);\n\t\t}\n\n\t\tprivate void Initialize (IAttributeSet attrs)\n\t\t{\n\t\t\tInflate (Context, Resource.Layout.signature_pad_layout, this);\n\n\t\t\t// find the views\n\t\t\tBackgroundImageView = FindViewById<ImageView> (Resource.Id.background_image);\n\t\t\tSignaturePadCanvas = FindViewById<SignaturePadCanvasView> (Resource.Id.signature_canvas);\n\t\t\tCaption = FindViewById<TextView> (Resource.Id.caption);\n\t\t\tSignatureLine = FindViewById<View> (Resource.Id.signature_line);\n\t\t\tSignaturePrompt = FindViewById<TextView> (Resource.Id.signature_prompt);\n\t\t\tClearLabel = FindViewById<TextView> (Resource.Id.clear_label);\n\n\t\t\t// set the properties from the attributes\n\t\t\tif (attrs != null)\n\t\t\t{\n\t\t\t\tusing (var a = Context.Theme.ObtainStyledAttributes (attrs, Resource.Styleable.SignaturePadView, 0, 0))\n\t\t\t\t{\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_strokeColor))\n\t\t\t\t\t\tStrokeColor = a.GetColor (Resource.Styleable.SignaturePadView_strokeColor, ImageConstructionSettings.DefaultStrokeColor);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_strokeWidth))\n\t\t\t\t\t\tStrokeWidth = a.GetDimension (Resource.Styleable.SignaturePadView_strokeWidth, ImageConstructionSettings.DefaultStrokeWidth);\n\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_captionText))\n\t\t\t\t\t\tCaptionText = a.GetString (Resource.Styleable.SignaturePadView_captionText);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_captionTextColor))\n\t\t\t\t\t\tCaptionTextColor = a.GetColor (Resource.Styleable.SignaturePadView_captionTextColor, SignaturePadDarkColor);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_captionTextSize))\n\t\t\t\t\t\tCaptionTextSize = a.GetDimension (Resource.Styleable.SignaturePadView_captionTextSize, DefaultFontSize);\n\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_clearLabelText))\n\t\t\t\t\t\tClearLabelText = a.GetString (Resource.Styleable.SignaturePadView_clearLabelText);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_clearLabelTextColor))\n\t\t\t\t\t\tClearLabelTextColor = a.GetColor (Resource.Styleable.SignaturePadView_clearLabelTextColor, SignaturePadDarkColor);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_clearLabelTextSize))\n\t\t\t\t\t\tClearLabelTextSize = a.GetDimension (Resource.Styleable.SignaturePadView_clearLabelTextSize, DefaultFontSize);\n\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_signaturePromptText))\n\t\t\t\t\t\tSignaturePromptText = a.GetString (Resource.Styleable.SignaturePadView_signaturePromptText);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_signaturePromptTextColor))\n\t\t\t\t\t\tSignaturePromptTextColor = a.GetColor (Resource.Styleable.SignaturePadView_signaturePromptTextColor, SignaturePadDarkColor);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_signaturePromptTextSize))\n\t\t\t\t\t\tSignaturePromptTextSize = a.GetDimension (Resource.Styleable.SignaturePadView_signaturePromptTextSize, DefaultFontSize);\n\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_signatureLineColor))\n\t\t\t\t\t\tSignatureLineColor = a.GetColor (Resource.Styleable.SignaturePadView_signatureLineColor, SignaturePadDarkColor);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_signatureLineSpacing))\n\t\t\t\t\t\tSignatureLineSpacing = a.GetInt (Resource.Styleable.SignaturePadView_signatureLineSpacing, (int)DefaultNarrowSpacing);\n\t\t\t\t\tif (a.HasValue (Resource.Styleable.SignaturePadView_signatureLineWidth))\n\t\t\t\t\t\tSignatureLineWidth = a.GetInt (Resource.Styleable.SignaturePadView_signatureLineWidth, (int)DefaultLineThickness);\n\n\t\t\t\t\ta.Recycle ();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// attach the events\n\t\t\tSignaturePadCanvas.StrokeCompleted += (sender, e) => OnSignatureStrokeCompleted ();\n\t\t\tSignaturePadCanvas.Cleared += (sender, e) => OnSignatureCleared ();\n\t\t\tClearLabel.Click += (sender, e) => OnClearTapped ();\n\n\t\t\t// initialize the view\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\tpublic SignaturePadCanvasView SignaturePadCanvas { get; private set; }\n\n\t\tpublic View SignatureLine { get; private set; }\n\n\t\tpublic TextView Caption { get; private set; }\n\n\t\tpublic TextView SignaturePrompt { get; private set; }\n\n\t\tpublic TextView ClearLabel { get; private set; }\n\n\t\t[Obsolete (\"Set the background instead.\")]\n\t\tpublic ImageView BackgroundImageView { get; private set; }\n\n\t\tpublic Color StrokeColor\n\t\t{\n\t\t\tget => SignaturePadCanvas.StrokeColor;\n\t\t\tset => SignaturePadCanvas.StrokeColor = value;\n\t\t}\n\n\t\tpublic float StrokeWidth\n\t\t{\n\t\t\tget => SignaturePadCanvas.StrokeWidth;\n\t\t\tset => SignaturePadCanvas.StrokeWidth = value;\n\t\t}\n\n\t\tpublic Color SignatureLineColor\n\t\t{\n\t\t\tget => (SignatureLine.Background as ColorDrawable)?.Color ?? Color.Transparent;\n\t\t\tset => SignatureLine.SetBackgroundColor (value);\n\t\t}\n\n\t\tpublic int SignatureLineWidth\n\t\t{\n\t\t\tget => SignatureLine.Height;\n\t\t\tset\n\t\t\t{\n\t\t\t\tvar param = SignatureLine.LayoutParameters;\n\t\t\t\tparam.Height = value;\n\t\t\t\tSignatureLine.LayoutParameters = param;\n\t\t\t}\n\t\t}\n\n\t\tpublic int SignatureLineSpacing\n\t\t{\n\t\t\tget => SignatureLine.PaddingBottom;\n\t\t\tset => SignatureLine.SetPadding (PaddingLeft, value, PaddingRight, value);\n\t\t}\n\n\t\tpublic string CaptionText\n\t\t{\n\t\t\tget => Caption.Text;\n\t\t\tset => Caption.Text = value;\n\t\t}\n\n\t\tpublic float CaptionTextSize\n\t\t{\n\t\t\tget => Caption.TextSize;\n\t\t\tset => Caption.TextSize = value;\n\t\t}\n\n\t\tpublic Color CaptionTextColor\n\t\t{\n\t\t\tget => new Color (Caption.CurrentTextColor);\n\t\t\tset => Caption.SetTextColor (value);\n\t\t}\n\n\t\tpublic string SignaturePromptText\n\t\t{\n\t\t\tget => SignaturePrompt.Text;\n\t\t\tset => SignaturePrompt.Text = value;\n\t\t}\n\n\t\tpublic float SignaturePromptTextSize\n\t\t{\n\t\t\tget => SignaturePrompt.TextSize;\n\t\t\tset => SignaturePrompt.TextSize = value;\n\t\t}\n\n\t\tpublic Color SignaturePromptTextColor\n\t\t{\n\t\t\tget => new Color (SignaturePrompt.CurrentTextColor);\n\t\t\tset => SignaturePrompt.SetTextColor (value);\n\t\t}\n\n\t\tpublic string ClearLabelText\n\t\t{\n\t\t\tget => ClearLabel.Text;\n\t\t\tset => ClearLabel.Text = value;\n\t\t}\n\n\t\tpublic float ClearLabelTextSize\n\t\t{\n\t\t\tget => ClearLabel.TextSize;\n\t\t\tset => ClearLabel.TextSize = value;\n\t\t}\n\n\t\tpublic Color ClearLabelTextColor\n\t\t{\n\t\t\tget => new Color (ClearLabel.CurrentTextColor);\n\t\t\tset => ClearLabel.SetTextColor (value);\n\t\t}\n\n\t\t[Obsolete (\"Set the background instead.\")]\n\t\tpublic Color BackgroundColor\n\t\t{\n\t\t\tget => (Background as ColorDrawable)?.Color ?? Color.Transparent;\n\t\t\tset => SetBackgroundColor (value);\n\t\t}\n\n\t\tprivate void UpdateUi ()\n\t\t{\n\t\t\tClearLabel.Visibility = IsBlank ? ViewStates.Invisible : ViewStates.Visible;\n\t\t}\n\n\t\tpublic override bool OnInterceptTouchEvent (MotionEvent ev)\n\t\t{\n\t\t\t// don't accept touch when the view is disabled\n\t\t\tif (!Enabled)\n\t\t\t\treturn true;\n\n\t\t\treturn base.OnInterceptTouchEvent (ev);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms/SignaturePad.Forms.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>netstandard1.0</TargetFramework>\n    <RootNamespace>SignaturePad.Forms</RootNamespace>\n    <AssemblyName>SignaturePad.Forms</AssemblyName>\n    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>\n    <DocumentationFile Condition=\" '$(Configuration)' == 'Release' \">bin\\$(Configuration)\\$(AssemblyName).xml</DocumentationFile>\n    <AssemblyVersion>1.0.0</AssemblyVersion>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <Version>1.0.0</Version>\n    <PackageId>Xamarin.Controls.SignaturePad.Forms</PackageId>\n    <Title>SignaturePad for Xamarin.Forms</Title>\n    <Product>$(AssemblyName) ($(TargetFramework))</Product>\n    <Authors>Microsoft</Authors>\n    <Owners>Microsoft</Owners>\n    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>\n    <Summary>Makes capturing, saving, and displaying signatures extremely simple.</Summary>\n    <Description>Makes capturing, saving, and displaying signatures extremely simple.</Description>\n    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>\n    <NeutralLanguage>en</NeutralLanguage>\n    <PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=874510</PackageIconUrl>\n    <RepositoryUrl>https://go.microsoft.com/fwlink/?linkid=874507</RepositoryUrl>\n    <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=874507</PackageProjectUrl>\n    <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</PackageLicenseUrl>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</PackageReleaseNotes>\n    <PackageTags>xamarin,signature,handwriting,windows,ios,android,uwp</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"MSBuild.Sdk.Extras\" Version=\"1.4.0\" PrivateAssets=\"All\" />\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <Compile Include=\"..\\SignaturePad.Forms.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n  </ItemGroup>\n\n  <Import Project=\"$(MSBuildSDKExtrasTargets)\" Condition=\"Exists('$(MSBuildSDKExtrasTargets)')\" />\n\n</Project>\n"
  },
  {
    "path": "src/SignaturePad.Forms/SignaturePadCanvasRenderer.cs",
    "content": "﻿namespace SignaturePad.Forms\n{\n\tinternal class SignaturePadCanvasRenderer\n\t{\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.Droid/SignaturePad.Forms.Droid.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>monoandroid7.1</TargetFramework>\n    <RootNamespace>SignaturePad.Forms</RootNamespace>\n    <AssemblyName>SignaturePad.Forms</AssemblyName>\n    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>\n    <AndroidUseIntermediateDesignerFile>true</AndroidUseIntermediateDesignerFile>\n    <DocumentationFile Condition=\" '$(Configuration)' == 'Release' \">bin\\$(Configuration)\\$(AssemblyName).xml</DocumentationFile>\n    <AssemblyVersion>1.0.0</AssemblyVersion>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <Version>1.0.0</Version>\n    <PackageId>Xamarin.Controls.SignaturePad.Forms</PackageId>\n    <Title>SignaturePad for Xamarin.Forms</Title>\n    <Product>$(AssemblyName) ($(TargetFramework))</Product>\n    <Authors>Microsoft</Authors>\n    <Owners>Microsoft</Owners>\n    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>\n    <Summary>Makes capturing, saving, and displaying signatures extremely simple.</Summary>\n    <Description>Makes capturing, saving, and displaying signatures extremely simple.</Description>\n    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>\n    <NeutralLanguage>en</NeutralLanguage>\n    <PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=874510</PackageIconUrl>\n    <RepositoryUrl>https://go.microsoft.com/fwlink/?linkid=874507</RepositoryUrl>\n    <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=874507</PackageProjectUrl>\n    <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</PackageLicenseUrl>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</PackageReleaseNotes>\n    <PackageTags>xamarin,signature,handwriting,windows,ios,android,uwp</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"MSBuild.Sdk.Extras\" Version=\"1.4.0\" PrivateAssets=\"All\" />\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n    <ProjectReference Include=\"..\\SignaturePad.Android\\SignaturePad.Android.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <Compile Include=\"..\\SignaturePad.Forms.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n    <Compile Include=\"..\\SignaturePad.Forms.Platform.Shared\\**\\*.cs\" Link=\"%(filename).platform%(Extension)\" />\n    <Folder Include=\"Resources\" />\n  </ItemGroup>\n\n  <Import Project=\"$(MSBuildSDKExtrasTargets)\" Condition=\"Exists('$(MSBuildSDKExtrasTargets)')\" />\n\n</Project>"
  },
  {
    "path": "src/SignaturePad.Forms.Droid/SignaturePadViewRenderer.cs",
    "content": "﻿using System;\nusing Xamarin.Forms;\nusing Xamarin.Forms.Platform.Android;\n\n[assembly: ExportRenderer (typeof (SignaturePad.Forms.SignaturePadView), typeof (SignaturePad.Forms.SignaturePadViewRenderer))]\n\nnamespace SignaturePad.Forms\n{\n\t// TODO: Remove this whole logic once Xamarin.Forms v2.4 is released.\n\t//       This is a fix for issue #94\n\t//       https://github.com/xamarin/SignaturePad/issues/94\n\n\t[RenderWith (typeof (SignaturePadViewRenderer))]\n\tpartial class SignaturePadView\n\t{\n\t}\n\n\tinternal class SignaturePadViewRenderer : VisualElementRenderer<Grid>\n\t{\n\t\t[Obsolete (\"This constructor is obsolete as of version 2.5. Please use 'SignaturePadCanvasRenderer (Context)' instead.\")]\n\t\tpublic SignaturePadViewRenderer ()\n\t\t{\n\t\t}\n\n\t\tpublic SignaturePadViewRenderer (Android.Content.Context context)\n\t\t\t: base (context)\n\t\t{\n\t\t}\n\n\t\tpublic override bool OnInterceptTouchEvent (Android.Views.MotionEvent ev)\n\t\t{\n\t\t\tif (!Enabled || Element?.IsEnabled == false)\n\t\t\t\treturn true;\n\n\t\t\treturn base.OnInterceptTouchEvent (ev);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.Platform.Shared/ColorExtensions.cs",
    "content": "using Color = Xamarin.Forms.Color;\n#if WINDOWS_PHONE\nusing System.Windows.Controls;\nusing System.Windows.Media;\nusing NativeColor = System.Windows.Media.Color;\n#elif WINDOWS_UWP || WINDOWS_PHONE_APP || WINDOWS_APP\nusing Windows.UI.Xaml.Controls;\nusing Windows.UI.Xaml.Media;\nusing NativeColor = Windows.UI.Color;\n#elif __IOS__\nusing UIKit;\nusing Xamarin.Forms.Platform.iOS;\nusing NativeColor = UIKit.UIColor;\n#elif __ANDROID__\nusing Android.Widget;\nusing Xamarin.Forms.Platform.Android;\nusing NativeColor = Android.Graphics.Color;\n#endif\n\nnamespace SignaturePad.Forms\n{\n\tpublic static class ColorExtensions\n\t{\n#if WINDOWS_PHONE || WINDOWS_UWP || WINDOWS_PHONE_APP || WINDOWS_APP\n\t\tpublic static NativeColor ToWindows (this Color color)\n\t\t{\n\t\t\treturn NativeColor.FromArgb (\n\t\t\t\t(byte)(color.A * 255),\n\t\t\t\t(byte)(color.R * 255),\n\t\t\t\t(byte)(color.G * 255),\n\t\t\t\t(byte)(color.B * 255));\n\t\t}\n#endif\n\n\t\tpublic static NativeColor ToNative (this Color color)\n\t\t{\n#if WINDOWS_PHONE || WINDOWS_UWP || WINDOWS_PHONE_APP || WINDOWS_APP\n\t\t\treturn color.ToWindows ();\n#elif __IOS__\n\t\t\treturn color.ToUIColor ();\n#elif __ANDROID__\n\t\t\treturn color.ToAndroid ();\n#endif\n\t\t}\n\n#if WINDOWS_PHONE || WINDOWS_UWP || WINDOWS_PHONE_APP || WINDOWS_APP\n\t\tpublic static void SetTextColor (this TextBlock textBlock, Color color)\n\t\t{\n\t\t\ttextBlock.Foreground = new SolidColorBrush (color.ToNative ());\n\t\t}\n#elif __IOS__\n\t\tpublic static void SetTextColor (this UILabel label, Color color)\n\t\t{\n\t\t\tlabel.TextColor = color.ToNative ();\n\t\t}\n\t\tpublic static void SetTextColor (this UIButton button, Color color)\n\t\t{\n\t\t\tbutton.SetTitleColor (color.ToNative (), UIControlState.Normal);\n\t\t}\n#elif __ANDROID__\n\t\tpublic static void SetTextColor (this TextView label, Color color)\n\t\t{\n\t\t\tlabel.SetTextColor (color.ToNative ());\n\t\t}\n#endif\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.Platform.Shared/SignaturePadCanvasRenderer.cs",
    "content": "using System;\nusing System.ComponentModel;\nusing System.Linq;\nusing Xamarin.Forms;\nusing SignaturePad.Forms;\nusing Color = Xamarin.Forms.Color;\nusing Point = Xamarin.Forms.Point;\n#if WINDOWS_PHONE\nusing Xamarin.Forms.Platform.WinPhone;\nusing NativeSignaturePadCanvasView = Xamarin.Controls.SignaturePadCanvasView;\nusing NativePoint = System.Windows.Point;\n#elif WINDOWS_UWP\nusing Xamarin.Forms.Platform.UWP;\nusing NativeSignaturePadCanvasView = Xamarin.Controls.SignaturePadCanvasView;\nusing NativePoint = Windows.Foundation.Point;\n#elif WINDOWS_PHONE_APP || WINDOWS_APP\nusing Xamarin.Forms.Platform.WinRT;\nusing NativeSignaturePadCanvasView = Xamarin.Controls.SignaturePadCanvasView;\nusing NativePoint = Windows.Foundation.Point;\n#elif __IOS__\nusing Xamarin.Forms.Platform.iOS;\nusing NativeSignaturePadCanvasView = Xamarin.Controls.SignaturePadCanvasView;\nusing NativePoint = CoreGraphics.CGPoint;\n#elif __ANDROID__\nusing Xamarin.Forms.Platform.Android;\nusing NativeSignaturePadCanvasView = Xamarin.Controls.SignaturePadCanvasView;\nusing NativePoint = System.Drawing.PointF;\n#endif\n\n[assembly: ExportRenderer (typeof (SignaturePadCanvasView), typeof (SignaturePadCanvasRenderer))]\n\nnamespace SignaturePad.Forms\n{\n\tpublic class SignaturePadCanvasRenderer : ViewRenderer<SignaturePadCanvasView, NativeSignaturePadCanvasView>\n\t{\n#if __ANDROID__\n\t\t[Obsolete (\"This constructor is obsolete as of version 2.5. Please use 'SignaturePadCanvasRenderer (Context)' instead.\")]\n#endif\n\t\tpublic SignaturePadCanvasRenderer ()\n\t\t{\n\t\t}\n\n#if __ANDROID__\n\t\tpublic SignaturePadCanvasRenderer (Android.Content.Context context)\n\t\t\t: base (context)\n\t\t{\n\t\t}\n#endif\n\n\t\tprotected override void OnElementChanged (ElementChangedEventArgs<SignaturePadCanvasView> e)\n\t\t{\n\t\t\tbase.OnElementChanged (e);\n\n\t\t\tif (Control == null && e.NewElement != null)\n\t\t\t{\n\t\t\t\t// Instantiate the native control and assign it to the Control property\n#if __ANDROID__\n\t\t\t\tvar native = new NativeSignaturePadCanvasView (Context);\n#else\n\t\t\t\tvar native = new NativeSignaturePadCanvasView ();\n#endif\n\n\t\t\t\tnative.StrokeCompleted += OnStrokeCompleted;\n\t\t\t\tnative.Cleared += OnCleared;\n\n\t\t\t\tSetNativeControl (native);\n\t\t\t}\n\n\t\t\tif (e.OldElement != null)\n\t\t\t{\n\t\t\t\t// Unsubscribe from event handlers and cleanup any resources\n\t\t\t\te.OldElement.ImageStreamRequested -= OnImageStreamRequested;\n\t\t\t\te.OldElement.IsBlankRequested -= OnIsBlankRequested;\n\t\t\t\te.OldElement.PointsRequested -= OnPointsRequested;\n\t\t\t\te.OldElement.PointsSpecified -= OnPointsSpecified;\n\t\t\t\te.OldElement.StrokesRequested -= OnStrokesRequested;\n\t\t\t\te.OldElement.StrokesSpecified -= OnStrokesSpecified;\n\t\t\t\te.OldElement.ClearRequested -= OnClearRequested;\n\t\t\t}\n\n\t\t\tif (e.NewElement != null)\n\t\t\t{\n\t\t\t\t// Configure the control and subscribe to event handlers\n\t\t\t\te.NewElement.ImageStreamRequested += OnImageStreamRequested;\n\t\t\t\te.NewElement.IsBlankRequested += OnIsBlankRequested;\n\t\t\t\te.NewElement.PointsRequested += OnPointsRequested;\n\t\t\t\te.NewElement.PointsSpecified += OnPointsSpecified;\n\t\t\t\te.NewElement.StrokesRequested += OnStrokesRequested;\n\t\t\t\te.NewElement.StrokesSpecified += OnStrokesSpecified;\n\t\t\t\te.NewElement.ClearRequested += OnClearRequested;\n\n\t\t\t\tUpdateAll ();\n\t\t\t}\n\t\t}\n\n\t\tprotected override void OnElementPropertyChanged (object sender, PropertyChangedEventArgs e)\n\t\t{\n\t\t\tbase.OnElementPropertyChanged (sender, e);\n\n\t\t\tUpdate (e.PropertyName);\n\t\t}\n\n\t\tprivate void OnStrokeCompleted (object sender, EventArgs e)\n\t\t{\n\t\t\tElement?.OnStrokeCompleted ();\n\t\t}\n\n\t\tprivate void OnCleared (object sender, EventArgs e)\n\t\t{\n\t\t\tElement?.OnCleared ();\n\t\t}\n\n\t\tprivate void OnImageStreamRequested (object sender, SignaturePadCanvasView.ImageStreamRequestedEventArgs e)\n\t\t{\n\t\t\tvar ctrl = Control;\n\t\t\tif (ctrl != null)\n\t\t\t{\n\t\t\t\tvar format = e.ImageFormat == SignatureImageFormat.Png ? Xamarin.Controls.SignatureImageFormat.Png : Xamarin.Controls.SignatureImageFormat.Jpeg;\n\n\t\t\t\tvar settings = new Xamarin.Controls.ImageConstructionSettings ();\n\t\t\t\tif (e.Settings.BackgroundColor.HasValue)\n\t\t\t\t{\n\t\t\t\t\tsettings.BackgroundColor = e.Settings.BackgroundColor.Value.ToNative ();\n\t\t\t\t}\n\t\t\t\tif (e.Settings.DesiredSizeOrScale.HasValue)\n\t\t\t\t{\n\t\t\t\t\tvar val = e.Settings.DesiredSizeOrScale.Value;\n\t\t\t\t\tsettings.DesiredSizeOrScale = new Xamarin.Controls.SizeOrScale (val.X, val.Y, (Xamarin.Controls.SizeOrScaleType)(int)val.Type, val.KeepAspectRatio);\n\t\t\t\t}\n\t\t\t\tsettings.ShouldCrop = e.Settings.ShouldCrop;\n\t\t\t\tif (e.Settings.StrokeColor.HasValue)\n\t\t\t\t{\n\t\t\t\t\tsettings.StrokeColor = e.Settings.StrokeColor.Value.ToNative ();\n\t\t\t\t}\n\t\t\t\tsettings.StrokeWidth = e.Settings.StrokeWidth;\n\t\t\t\tsettings.Padding = e.Settings.Padding;\n\n\t\t\t\te.ImageStreamTask = ctrl.GetImageStreamAsync (format, settings);\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnIsBlankRequested (object sender, SignaturePadCanvasView.IsBlankRequestedEventArgs e)\n\t\t{\n\t\t\tvar ctrl = Control;\n\t\t\tif (ctrl != null)\n\t\t\t{\n\t\t\t\te.IsBlank = ctrl.IsBlank;\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnPointsRequested (object sender, SignaturePadCanvasView.PointsEventArgs e)\n\t\t{\n\t\t\tvar ctrl = Control;\n\t\t\tif (ctrl != null)\n\t\t\t{\n\t\t\t\te.Points = ctrl.Points.Select (p => new Point (p.X, p.Y));\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnPointsSpecified (object sender, SignaturePadCanvasView.PointsEventArgs e)\n\t\t{\n\t\t\tvar ctrl = Control;\n\t\t\tif (ctrl != null)\n\t\t\t{\n\t\t\t\tctrl.LoadPoints (e.Points.Select (p => new NativePoint ((float)p.X, (float)p.Y)).ToArray ());\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnStrokesRequested (object sender, SignaturePadCanvasView.StrokesEventArgs e)\n\t\t{\n\t\t\tvar ctrl = Control;\n\t\t\tif (ctrl != null)\n\t\t\t{\n\t\t\t\te.Strokes = ctrl.Strokes.Select (s => s.Select (p => new Point (p.X, p.Y)));\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnStrokesSpecified (object sender, SignaturePadCanvasView.StrokesEventArgs e)\n\t\t{\n\t\t\tvar ctrl = Control;\n\t\t\tif (ctrl != null)\n\t\t\t{\n\t\t\t\tctrl.LoadStrokes (e.Strokes.Select (s => s.Select (p => new NativePoint ((float)p.X, (float)p.Y)).ToArray ()).ToArray ());\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnClearRequested (object sender, EventArgs e)\n\t\t{\n\t\t\tvar ctrl = Control;\n\t\t\tif (ctrl != null)\n\t\t\t{\n\t\t\t\tctrl.Clear ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Update all the properties on the native view.\n\t\t/// </summary>\n\t\tprivate void UpdateAll ()\n\t\t{\n\t\t\tif (Control == null || Element == null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Element.StrokeColor != Color.Default)\n\t\t\t{\n\t\t\t\tControl.StrokeColor = Element.StrokeColor.ToNative ();\n\t\t\t}\n\t\t\tif (Element.StrokeWidth > 0)\n\t\t\t{\n\t\t\t\tControl.StrokeWidth = Element.StrokeWidth;\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Update a specific property on the native view.\n\t\t/// </summary>\n\t\tprivate void Update (string property)\n\t\t{\n\t\t\tif (Control == null || Element == null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (property == SignaturePadCanvasView.StrokeColorProperty.PropertyName)\n\t\t\t{\n\t\t\t\tControl.StrokeColor = Element.StrokeColor.ToNative ();\n\t\t\t}\n\t\t\telse if (property == SignaturePadCanvasView.StrokeWidthProperty.PropertyName)\n\t\t\t{\n\t\t\t\tControl.StrokeWidth = Element.StrokeWidth;\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.Shared/ImageConstructionSettings.cs",
    "content": "﻿using Xamarin.Forms;\n\nnamespace SignaturePad.Forms\n{\n\tpublic enum SizeOrScaleType\n\t{\n\t\tSize,\n\t\tScale\n\t}\n\n\tpublic struct SizeOrScale\n\t{\n\t\tpublic SizeOrScale (float xy, SizeOrScaleType type)\n\t\t{\n\t\t\tX = xy;\n\t\t\tY = xy;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = true;\n\t\t}\n\n\t\tpublic SizeOrScale (float xy, SizeOrScaleType type, bool keepAspectRatio)\n\t\t{\n\t\t\tX = xy;\n\t\t\tY = xy;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = keepAspectRatio;\n\t\t}\n\n\t\tpublic SizeOrScale (Size size, SizeOrScaleType type)\n\t\t{\n\t\t\tX = (float)size.Width;\n\t\t\tY = (float)size.Height;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = true;\n\t\t}\n\n\t\tpublic SizeOrScale (Size size, SizeOrScaleType type, bool keepAspectRatio)\n\t\t{\n\t\t\tX = (float)size.Width;\n\t\t\tY = (float)size.Height;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = keepAspectRatio;\n\t\t}\n\n\t\tpublic SizeOrScale (float x, float y, SizeOrScaleType type)\n\t\t{\n\t\t\tX = x;\n\t\t\tY = y;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = true;\n\t\t}\n\n\t\tpublic SizeOrScale (float x, float y, SizeOrScaleType type, bool keepAspectRatio)\n\t\t{\n\t\t\tX = x;\n\t\t\tY = y;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = keepAspectRatio;\n\t\t}\n\n\t\tpublic float X { get; set; }\n\n\t\tpublic float Y { get; set; }\n\n\t\tpublic SizeOrScaleType Type { get; set; }\n\n\t\tpublic bool KeepAspectRatio { get; set; }\n\n\t\tpublic bool IsValid => X > 0 && Y > 0;\n\n\t\tpublic Size GetScale (float width, float height)\n\t\t{\n\t\t\tif (Type == SizeOrScaleType.Scale)\n\t\t\t{\n\t\t\t\treturn new Size (X, Y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new Size (X / width, Y / height);\n\t\t\t}\n\t\t}\n\n\t\tpublic Size GetSize (float width, float height)\n\t\t{\n\t\t\tif (Type == SizeOrScaleType.Scale)\n\t\t\t{\n\t\t\t\treturn new Size (width * X, height * Y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new Size (X, Y);\n\t\t\t}\n\t\t}\n\n\t\tpublic static implicit operator SizeOrScale (float scale)\n\t\t{\n\t\t\treturn new SizeOrScale (scale, SizeOrScaleType.Scale);\n\t\t}\n\n\t\tpublic static implicit operator SizeOrScale (Size size)\n\t\t{\n\t\t\treturn new SizeOrScale ((float)size.Width, (float)size.Height, SizeOrScaleType.Size);\n\t\t}\n\t}\n\n\tpublic struct ImageConstructionSettings\n\t{\n\t\tpublic static readonly bool DefaultShouldCrop = true;\n\t\tpublic static readonly SizeOrScale DefaultSizeOrScale = 1f;\n\t\tpublic static readonly Color DefaultStrokeColor = Color.Black;\n\t\tpublic static readonly Color DefaultBackgroundColor = Color.Transparent;\n\t\tpublic static readonly float DefaultStrokeWidth = 2f;\n\t\tpublic static readonly float DefaultPadding = 5f;\n\n\t\tpublic bool? ShouldCrop { get; set; }\n\n\t\tpublic SizeOrScale? DesiredSizeOrScale { get; set; }\n\n\t\tpublic Color? StrokeColor { get; set; }\n\n\t\tpublic Color? BackgroundColor { get; set; }\n\n\t\tpublic float? StrokeWidth { get; set; }\n\n\t\tpublic float? Padding { get; set; }\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.Shared/SignatureImageFormat.cs",
    "content": "using System;\n\nnamespace SignaturePad.Forms\n{\n\tpublic enum SignatureImageFormat\n\t{\n\t\tPng,\n\t\tJpeg,\n\n\t\t[Obsolete (\"Use Jpeg instead.\")]\n\t\tJpg = Jpeg\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.Shared/SignaturePadCanvasView.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Threading.Tasks;\nusing System.Windows.Input;\nusing Xamarin.Forms;\n\nnamespace SignaturePad.Forms\n{\n\t[RenderWith (typeof (SignaturePadCanvasRenderer))]\n\tpublic class SignaturePadCanvasView : View\n\t{\n\t\tpublic static readonly BindableProperty StrokeColorProperty = BindableProperty.Create (\n\t\t\tnameof (StrokeColor),\n\t\t\ttypeof (Color),\n\t\t\ttypeof (SignaturePadView),\n\t\t\tImageConstructionSettings.DefaultStrokeColor);\n\n\t\tpublic static readonly BindableProperty StrokeWidthProperty = BindableProperty.Create (\n\t\t\tnameof (StrokeWidth),\n\t\t\ttypeof (float),\n\t\t\ttypeof (SignaturePadView),\n\t\t\tImageConstructionSettings.DefaultStrokeWidth);\n\n\t\tpublic static readonly BindableProperty ClearedCommandProperty = BindableProperty.Create (\n\t\t\tnameof (ClearedCommand),\n\t\t\ttypeof (ICommand),\n\t\t\ttypeof (SignaturePadView),\n\t\t\tdefault (ICommand));\n\n\t\tpublic static readonly BindableProperty StrokeCompletedCommandProperty = BindableProperty.Create (\n\t\t\tnameof (StrokeCompletedCommand),\n\t\t\ttypeof (ICommand),\n\t\t\ttypeof (SignaturePadView),\n\t\t\tdefault (ICommand));\n\n\t\tinternal static readonly BindablePropertyKey IsBlankPropertyKey = BindableProperty.CreateReadOnly (\n\t\t\tnameof (IsBlank),\n\t\t\ttypeof (bool),\n\t\t\ttypeof (SignaturePadView),\n\t\t\ttrue);\n\t\tpublic static readonly BindableProperty IsBlankProperty = IsBlankPropertyKey.BindableProperty;\n\n\t\tpublic bool IsBlank\n\t\t{\n\t\t\tget { return RequestIsBlank (); }\n\t\t}\n\n\t\tpublic float StrokeWidth\n\t\t{\n\t\t\tget { return (float)GetValue (StrokeWidthProperty); }\n\t\t\tset { SetValue (StrokeWidthProperty, value); }\n\t\t}\n\n\t\tpublic Color StrokeColor\n\t\t{\n\t\t\tget { return (Color)GetValue (StrokeColorProperty); }\n\t\t\tset { SetValue (StrokeColorProperty, value); }\n\t\t}\n\n\t\tpublic IEnumerable<Point> Points\n\t\t{\n\t\t\tget { return GetSignaturePoints (); }\n\t\t\tset { SetSignaturePoints (value); }\n\t\t}\n\n\t\tpublic IEnumerable<IEnumerable<Point>> Strokes\n\t\t{\n\t\t\tget { return GetSignatureStrokes (); }\n\t\t\tset { SetSignatureStrokes (value); }\n\t\t}\n\n\t\tpublic ICommand ClearedCommand\n\t\t{\n\t\t\tget => (ICommand)GetValue (ClearedCommandProperty);\n\t\t\tset => SetValue (ClearedCommandProperty, value);\n\t\t}\n\n\t\tpublic ICommand StrokeCompletedCommand\n\t\t{\n\t\t\tget => (ICommand)GetValue (StrokeCompletedCommandProperty);\n\t\t\tset => SetValue (StrokeCompletedCommandProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified size.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Size size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified scale.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio),\n\t\t\t\tStrokeColor = strokeColor\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified size with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Size size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified scale with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Color fillColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio),\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified size with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Color fillColor, Size size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified scale with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Color fillColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature using the specified settings.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat imageFormat, ImageConstructionSettings settings)\n\t\t{\n\t\t\tvar args = new ImageStreamRequestedEventArgs (imageFormat, settings);\n\t\t\tImageStreamRequested?.Invoke (this, args);\n\t\t\treturn args.ImageStreamTask;\n\t\t}\n\n\t\tpublic void Clear ()\n\t\t{\n\t\t\tClearRequested?.Invoke (this, null);\n\t\t}\n\n\t\tprivate IEnumerable<Point> GetSignaturePoints ()\n\t\t{\n\t\t\tvar args = new PointsEventArgs ();\n\t\t\tPointsRequested?.Invoke (this, args);\n\t\t\treturn args.Points;\n\t\t}\n\n\t\tprivate void SetSignaturePoints (IEnumerable<Point> points)\n\t\t{\n\t\t\tPointsSpecified?.Invoke (this, new PointsEventArgs { Points = points });\n\t\t}\n\n\t\tprivate IEnumerable<IEnumerable<Point>> GetSignatureStrokes ()\n\t\t{\n\t\t\tvar args = new StrokesEventArgs ();\n\t\t\tStrokesRequested?.Invoke (this, args);\n\t\t\treturn args.Strokes;\n\t\t}\n\n\t\tprivate void SetSignatureStrokes (IEnumerable<IEnumerable<Point>> strokes)\n\t\t{\n\t\t\tStrokesSpecified?.Invoke (this, new StrokesEventArgs { Strokes = strokes });\n\t\t}\n\n\t\tprivate bool RequestIsBlank ()\n\t\t{\n\t\t\tvar args = new IsBlankRequestedEventArgs ();\n\t\t\tIsBlankRequested?.Invoke (this, args);\n\t\t\treturn args.IsBlank;\n\t\t}\n\n\t\tinternal void OnStrokeCompleted ()\n\t\t{\n\t\t\tUpdateBindableProperties ();\n\n\t\t\tStrokeCompleted?.Invoke (this, EventArgs.Empty);\n\n\t\t\tif (StrokeCompletedCommand != null && StrokeCompletedCommand.CanExecute (null))\n\t\t\t{\n\t\t\t\tStrokeCompletedCommand.Execute (null);\n\t\t\t}\n\t\t}\n\n\t\tinternal void OnCleared ()\n\t\t{\n\t\t\tUpdateBindableProperties ();\n\n\t\t\tCleared?.Invoke (this, EventArgs.Empty);\n\n\t\t\tif (ClearedCommand != null && ClearedCommand.CanExecute (null))\n\t\t\t{\n\t\t\t\tClearedCommand.Execute (null);\n\t\t\t}\n\t\t}\n\n\t\tprivate void UpdateBindableProperties ()\n\t\t{\n\t\t\tSetValue (IsBlankPropertyKey, IsBlank);\n\t\t}\n\n\t\tpublic event EventHandler StrokeCompleted;\n\t\tpublic event EventHandler Cleared;\n\n\t\tinternal event EventHandler<ImageStreamRequestedEventArgs> ImageStreamRequested;\n\t\tinternal event EventHandler<IsBlankRequestedEventArgs> IsBlankRequested;\n\t\tinternal event EventHandler<PointsEventArgs> PointsRequested;\n\t\tinternal event EventHandler<PointsEventArgs> PointsSpecified;\n\t\tinternal event EventHandler<StrokesEventArgs> StrokesRequested;\n\t\tinternal event EventHandler<StrokesEventArgs> StrokesSpecified;\n\t\tinternal event EventHandler<EventArgs> ClearRequested;\n\n\t\tinternal class ImageStreamRequestedEventArgs : EventArgs\n\t\t{\n\t\t\tpublic ImageStreamRequestedEventArgs (SignatureImageFormat imageFormat, ImageConstructionSettings settings)\n\t\t\t{\n\t\t\t\tImageFormat = imageFormat;\n\t\t\t\tSettings = settings;\n\t\t\t}\n\n\t\t\tpublic SignatureImageFormat ImageFormat { get; private set; }\n\n\t\t\tpublic ImageConstructionSettings Settings { get; private set; }\n\n\t\t\tpublic Task<Stream> ImageStreamTask { get; set; } = Task.FromResult<Stream> (null);\n\t\t}\n\n\t\tinternal class IsBlankRequestedEventArgs : EventArgs\n\t\t{\n\t\t\tpublic bool IsBlank { get; set; } = true;\n\t\t}\n\n\t\tinternal class PointsEventArgs : EventArgs\n\t\t{\n\t\t\tpublic IEnumerable<Point> Points { get; set; } = new Point[0];\n\t\t}\n\n\t\tinternal class StrokesEventArgs : EventArgs\n\t\t{\n\t\t\tpublic IEnumerable<IEnumerable<Point>> Strokes { get; set; } = new Point[0][];\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.Shared/SignaturePadView.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Runtime.CompilerServices;\nusing System.Threading.Tasks;\nusing System.Windows.Input;\nusing Xamarin.Forms;\n\nnamespace SignaturePad.Forms\n{\n\tpublic partial class SignaturePadView : Grid\n\t{\n\t\tprivate const double DefaultWideSpacing = 12.0;\n\t\tprivate const double DefaultNarrowSpacing = 3.0;\n\t\tprivate const double DefaultLineWidth = 1.0;\n\n\t\tprivate const double DefaultFontSize = 15.0;\n\n\t\tprivate const string DefaultClearLabelText = \"clear\";\n\t\tprivate const string DefaultPromptText = \"▶\";\n\t\tprivate const string DefaultCaptionText = \"sign above the line\";\n\n\t\tprivate static readonly Color SignaturePadDarkColor = Color.Black;\n\t\tprivate static readonly Color SignaturePadLightColor = Color.White;\n\n\t\tpublic static readonly BindableProperty StrokeColorProperty;\n\t\tpublic static readonly BindableProperty StrokeWidthProperty;\n\t\tpublic static readonly BindableProperty SignatureLineColorProperty;\n\t\tpublic static readonly BindableProperty SignatureLineWidthProperty;\n\t\tpublic static readonly BindableProperty SignatureLineSpacingProperty;\n\t\tpublic static readonly BindableProperty CaptionTextProperty;\n\t\tpublic static readonly BindableProperty CaptionFontSizeProperty;\n\t\tpublic static readonly BindableProperty CaptionTextColorProperty;\n\t\tpublic static readonly BindableProperty PromptTextProperty;\n\t\tpublic static readonly BindableProperty PromptFontSizeProperty;\n\t\tpublic static readonly BindableProperty PromptTextColorProperty;\n\t\tpublic static readonly BindableProperty ClearTextProperty;\n\t\tpublic static readonly BindableProperty ClearFontSizeProperty;\n\t\tpublic static readonly BindableProperty ClearTextColorProperty;\n\t\tpublic static readonly BindableProperty BackgroundImageProperty;\n\t\tpublic static readonly BindableProperty BackgroundImageAspectProperty;\n\t\tpublic static readonly BindableProperty BackgroundImageOpacityProperty;\n\t\tpublic static readonly BindableProperty ClearedCommandProperty;\n\t\tpublic static readonly BindableProperty StrokeCompletedCommandProperty;\n\t\tinternal static readonly BindablePropertyKey IsBlankPropertyKey;\n\t\tpublic static readonly BindableProperty IsBlankProperty;\n\n\t\tprivate readonly TapGestureRecognizer clearLabelTap;\n\n\t\tstatic SignaturePadView ()\n\t\t{\n\t\t\tStrokeColorProperty = BindableProperty.Create (\n\t\t\t\tnameof (StrokeColor),\n\t\t\t\ttypeof (Color),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tImageConstructionSettings.DefaultStrokeColor,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).SignaturePadCanvas.StrokeColor = (Color)newValue);\n\n\t\t\tStrokeWidthProperty = BindableProperty.Create (\n\t\t\t\tnameof (StrokeWidth),\n\t\t\t\ttypeof (float),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tImageConstructionSettings.DefaultStrokeWidth,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).SignaturePadCanvas.StrokeWidth = (float)newValue);\n\n\t\t\tSignatureLineColorProperty = BindableProperty.Create (\n\t\t\t\tnameof (SignatureLineColor),\n\t\t\t\ttypeof (Color),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tSignaturePadDarkColor,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).SignatureLine.Color = (Color)newValue);\n\n\t\t\tSignatureLineWidthProperty = BindableProperty.Create (\n\t\t\t\tnameof (SignatureLineWidth),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultLineWidth,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).SignatureLine.HeightRequest = (double)newValue);\n\n\t\t\tSignatureLineSpacingProperty = BindableProperty.Create (\n\t\t\t\tnameof (SignatureLineSpacing),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultNarrowSpacing,\n\t\t\t\tpropertyChanged: OnPaddingChanged);\n\n\t\t\tCaptionTextProperty = BindableProperty.Create (\n\t\t\t\tnameof (CaptionText),\n\t\t\t\ttypeof (string),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultCaptionText,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).CaptionLabel.Text = (string)newValue);\n\n\t\t\tCaptionFontSizeProperty = BindableProperty.Create (\n\t\t\t\tnameof (CaptionFontSize),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultFontSize,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).CaptionLabel.FontSize = (double)newValue);\n\n\t\t\tCaptionTextColorProperty = BindableProperty.Create (\n\t\t\t\tnameof (CaptionTextColor),\n\t\t\t\ttypeof (Color),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tSignaturePadDarkColor,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).CaptionLabel.TextColor = (Color)newValue);\n\n\t\t\tPromptTextProperty = BindableProperty.Create (\n\t\t\t\tnameof (PromptText),\n\t\t\t\ttypeof (string),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultPromptText,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).SignaturePrompt.Text = (string)newValue);\n\n\t\t\tPromptFontSizeProperty = BindableProperty.Create (\n\t\t\t\tnameof (PromptFontSize),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultFontSize,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).SignaturePrompt.FontSize = (double)newValue);\n\n\t\t\tPromptTextColorProperty = BindableProperty.Create (\n\t\t\t\tnameof (PromptTextColor),\n\t\t\t\ttypeof (Color),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tSignaturePadDarkColor,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).SignaturePrompt.TextColor = (Color)newValue);\n\n\t\t\tClearTextProperty = BindableProperty.Create (\n\t\t\t\tnameof (ClearText),\n\t\t\t\ttypeof (string),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultClearLabelText,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).ClearLabel.Text = (string)newValue);\n\n\t\t\tClearFontSizeProperty = BindableProperty.Create (\n\t\t\t\tnameof (ClearFontSize),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tDefaultFontSize,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).ClearLabel.FontSize = (double)newValue);\n\n\t\t\tClearTextColorProperty = BindableProperty.Create (\n\t\t\t\tnameof (ClearTextColor),\n\t\t\t\ttypeof (Color),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tSignaturePadDarkColor,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).ClearLabel.TextColor = (Color)newValue);\n\n\t\t\tBackgroundImageProperty = BindableProperty.Create (\n\t\t\t\tnameof (BackgroundImage),\n\t\t\t\ttypeof (ImageSource),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tdefault (ImageSource),\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).BackgroundImageView.Source = (ImageSource)newValue);\n\n\t\t\tBackgroundImageAspectProperty = BindableProperty.Create (\n\t\t\t\tnameof (BackgroundImageAspect),\n\t\t\t\ttypeof (Aspect),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tAspect.AspectFit,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).BackgroundImageView.Aspect = (Aspect)newValue);\n\n\t\t\tBackgroundImageOpacityProperty = BindableProperty.Create (\n\t\t\t\tnameof (BackgroundImageOpacity),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\t1.0,\n\t\t\t\tpropertyChanged: (bindable, oldValue, newValue) => ((SignaturePadView)bindable).BackgroundImageView.Opacity = (double)newValue);\n\n\t\t\tClearedCommandProperty = BindableProperty.Create (\n\t\t\t\tnameof (ClearedCommand),\n\t\t\t\ttypeof (ICommand),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tdefault (ICommand));\n\n\t\t\tStrokeCompletedCommandProperty = BindableProperty.Create (\n\t\t\t\tnameof (StrokeCompletedCommand),\n\t\t\t\ttypeof (ICommand),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\tdefault (ICommand));\n\n\t\t\tIsBlankPropertyKey = BindableProperty.CreateReadOnly (\n\t\t\t\tnameof (IsBlank),\n\t\t\t\ttypeof (bool),\n\t\t\t\ttypeof (SignaturePadView),\n\t\t\t\ttrue);\n\t\t\tIsBlankProperty = IsBlankPropertyKey.BindableProperty;\n\t\t}\n\n\t\tpublic SignaturePadView ()\n\t\t{\n\t\t\t// add the background view\n\t\t\tBackgroundImageView = new Image\n\t\t\t{\n\t\t\t\tSource = BackgroundImage,\n\t\t\t\tAspect = BackgroundImageAspect,\n\t\t\t\tOpacity = BackgroundImageOpacity,\n\t\t\t\tInputTransparent = true,\n\t\t\t\tHorizontalOptions = LayoutOptions.Fill,\n\t\t\t\tVerticalOptions = LayoutOptions.Fill,\n\t\t\t};\n\t\t\tChildren.Add (BackgroundImageView);\n\n\t\t\t// add the main signature view\n\t\t\tSignaturePadCanvas = new SignaturePadCanvasView\n\t\t\t{\n\t\t\t\tStrokeColor = StrokeColor,\n\t\t\t\tStrokeWidth = StrokeWidth,\n\t\t\t\tHorizontalOptions = LayoutOptions.Fill,\n\t\t\t\tVerticalOptions = LayoutOptions.Fill\n\t\t\t};\n\t\t\tChildren.Add (SignaturePadCanvas);\n\n\t\t\t// add the clear label\n\t\t\tClearLabel = new Label\n\t\t\t{\n\t\t\t\tText = ClearText,\n\t\t\t\tFontSize = ClearFontSize,\n\t\t\t\tTextColor = ClearTextColor,\n\t\t\t\tFontAttributes = FontAttributes.Bold,\n\t\t\t\tIsVisible = false,\n\t\t\t\tHorizontalOptions = LayoutOptions.End,\n\t\t\t\tVerticalOptions = LayoutOptions.Start\n\t\t\t};\n\t\t\tChildren.Add (ClearLabel);\n\n\t\t\t// add the footer bit\n\t\t\tvar footer = new StackLayout\n\t\t\t{\n\t\t\t\tSpacing = 0,\n\t\t\t\tPadding = 0,\n\t\t\t\tMargin = 0,\n\t\t\t\tInputTransparent = true,\n\t\t\t\tHorizontalOptions = LayoutOptions.Fill,\n\t\t\t\tVerticalOptions = LayoutOptions.End,\n\t\t\t};\n\t\t\tChildren.Add (footer);\n\n\t\t\t// add the prompt\n\t\t\tSignaturePrompt = new Label\n\t\t\t{\n\t\t\t\tText = PromptText,\n\t\t\t\tFontSize = PromptFontSize,\n\t\t\t\tTextColor = PromptTextColor,\n\t\t\t\tFontAttributes = FontAttributes.Bold,\n\t\t\t\tInputTransparent = true,\n\t\t\t\tHorizontalOptions = LayoutOptions.Fill,\n\t\t\t\tVerticalOptions = LayoutOptions.End\n\t\t\t};\n\t\t\tfooter.Children.Add (SignaturePrompt);\n\n\t\t\t// add the signature line\n\t\t\tSignatureLine = new BoxView\n\t\t\t{\n\t\t\t\tColor = SignatureLineColor,\n\t\t\t\tHeightRequest = SignatureLineWidth,\n\t\t\t\tInputTransparent = true,\n\t\t\t\tHorizontalOptions = LayoutOptions.Fill,\n\t\t\t\tVerticalOptions = LayoutOptions.End\n\t\t\t};\n\t\t\tfooter.Children.Add (SignatureLine);\n\n\t\t\t// add the caption\n\t\t\tCaptionLabel = new Label\n\t\t\t{\n\t\t\t\tText = CaptionText,\n\t\t\t\tFontSize = CaptionFontSize,\n\t\t\t\tTextColor = CaptionTextColor,\n\t\t\t\tHorizontalTextAlignment = TextAlignment.Center,\n\t\t\t\tInputTransparent = true,\n\t\t\t\tHorizontalOptions = LayoutOptions.Fill,\n\t\t\t\tVerticalOptions = LayoutOptions.End\n\t\t\t};\n\t\t\tfooter.Children.Add (CaptionLabel);\n\n\t\t\t// set up the main control\n\t\t\tRowSpacing = 0;\n\t\t\tColumnSpacing = 0;\n\t\t\tPadding = new Thickness (DefaultWideSpacing, DefaultWideSpacing, DefaultWideSpacing, DefaultNarrowSpacing);\n\t\t\tBackgroundColor = SignaturePadLightColor;\n\n\t\t\t// set up events from the controls\n\t\t\tSignaturePadCanvas.StrokeCompleted += delegate\n\t\t\t{\n\t\t\t\tOnSignatureStrokeCompleted ();\n\t\t\t};\n\t\t\tSignaturePadCanvas.Cleared += delegate\n\t\t\t{\n\t\t\t\tOnSignatureCleared ();\n\t\t\t};\n\t\t\tclearLabelTap = new TapGestureRecognizer\n\t\t\t{\n\t\t\t\tCommand = new Command (() => OnClearTapped ())\n\t\t\t};\n\t\t\tClearLabel.GestureRecognizers.Add (clearLabelTap);\n\n\t\t\tOnPaddingChanged ();\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\tprotected override void OnPropertyChanged ([CallerMemberName] string propertyName = null)\n\t\t{\n\t\t\tbase.OnPropertyChanged (propertyName);\n\n\t\t\tif (propertyName == IsEnabledProperty.PropertyName)\n\t\t\t{\n\t\t\t\tSignaturePadCanvas.IsEnabled = IsEnabled;\n\t\t\t\tif (IsEnabled)\n\t\t\t\t\tClearLabel.GestureRecognizers.Add (clearLabelTap);\n\t\t\t\telse\n\t\t\t\t\tClearLabel.GestureRecognizers.Remove (clearLabelTap);\n\t\t\t}\n\t\t\telse if (propertyName == PaddingProperty.PropertyName)\n\t\t\t{\n\t\t\t\tOnPaddingChanged ();\n\t\t\t}\n\t\t}\n\n\t\tpublic IEnumerable<IEnumerable<Point>> Strokes\n\t\t{\n\t\t\tget { return SignaturePadCanvas.Strokes; }\n\t\t\tset\n\t\t\t{\n\t\t\t\tSignaturePadCanvas.Strokes = value;\n\t\t\t\tUpdateUi ();\n\t\t\t}\n\t\t}\n\n\t\tpublic IEnumerable<Point> Points\n\t\t{\n\t\t\tget { return SignaturePadCanvas.Points; }\n\t\t\tset\n\t\t\t{\n\t\t\t\tSignaturePadCanvas.Points = value;\n\t\t\t\tUpdateUi ();\n\t\t\t}\n\t\t}\n\n\t\tpublic bool IsBlank => (bool)GetValue (IsBlankProperty);\n\n\t\t/// <summary>\n\t\t/// Gets the underlying control that handles the signatures.\n\t\t/// </summary>\n\t\tpublic SignaturePadCanvasView SignaturePadCanvas { get; private set; }\n\n\t\t/// <summary>\n\t\t/// Gets the horizontal line that goes in the lower part of the pad.\n\t\t/// </summary>\n\t\tpublic BoxView SignatureLine { get; private set; }\n\n\t\t/// <summary>\n\t\t/// The caption displayed under the signature line.\n\t\t/// </summary>\n\t\tpublic Label CaptionLabel { get; private set; }\n\n\t\t/// <summary>\n\t\t/// The prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\tpublic Label SignaturePrompt { get; private set; }\n\n\t\t/// <summary>\n\t\t/// Gets the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\tpublic Label ClearLabel { get; private set; }\n\n\t\t/// <summary>\n\t\t/// Gets the image view that handles the background image.\n\t\t/// </summary>\n\t\tpublic Image BackgroundImageView { get; private set; }\n\n\t\t/// <summary>\n\t\t/// Gets or sets the color of the signature strokes.\n\t\t/// </summary>\n\t\tpublic Color StrokeColor\n\t\t{\n\t\t\tget => (Color)GetValue (StrokeColorProperty);\n\t\t\tset => SetValue (StrokeColorProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the width of the signature strokes.\n\t\t/// </summary>\n\t\tpublic float StrokeWidth\n\t\t{\n\t\t\tget => (float)GetValue (StrokeWidthProperty);\n\t\t\tset => SetValue (StrokeWidthProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the color of the signature line.\n\t\t/// </summary>\n\t\tpublic Color SignatureLineColor\n\t\t{\n\t\t\tget => (Color)GetValue (SignatureLineColorProperty);\n\t\t\tset => SetValue (SignatureLineColorProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the width of the signature line.\n\t\t/// </summary>\n\t\tpublic double SignatureLineWidth\n\t\t{\n\t\t\tget => (double)GetValue (SignatureLineWidthProperty);\n\t\t\tset => SetValue (SignatureLineWidthProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the size of the spacing between the signature line and the caption.\n\t\t/// </summary>\n\t\tpublic double SignatureLineSpacing\n\t\t{\n\t\t\tget => (double)GetValue (SignatureLineSpacingProperty);\n\t\t\tset => SetValue (SignatureLineSpacingProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text for the caption displayed under the signature line.\n\t\t/// </summary>\n\t\tpublic string CaptionText\n\t\t{\n\t\t\tget => (string)GetValue (CaptionTextProperty);\n\t\t\tset => SetValue (CaptionTextProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the font size of the caption.\n\t\t/// </summary>\n\t\tpublic double CaptionFontSize\n\t\t{\n\t\t\tget => (double)GetValue (CaptionFontSizeProperty);\n\t\t\tset => SetValue (CaptionFontSizeProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the color of the caption text.\n\t\t/// </summary>\n\t\tpublic Color CaptionTextColor\n\t\t{\n\t\t\tget => (Color)GetValue (CaptionTextColorProperty);\n\t\t\tset => SetValue (CaptionTextColorProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text for the prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\tpublic string PromptText\n\t\t{\n\t\t\tget => (string)GetValue (PromptTextProperty);\n\t\t\tset => SetValue (PromptTextProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the font size of the prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\tpublic double PromptFontSize\n\t\t{\n\t\t\tget => (double)GetValue (PromptFontSizeProperty);\n\t\t\tset => SetValue (PromptFontSizeProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text color of the prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\tpublic Color PromptTextColor\n\t\t{\n\t\t\tget => (Color)GetValue (PromptTextColorProperty);\n\t\t\tset => SetValue (PromptTextColorProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text for the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\tpublic string ClearText\n\t\t{\n\t\t\tget => (string)GetValue (ClearTextProperty);\n\t\t\tset => SetValue (ClearTextProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the font size of the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\tpublic double ClearFontSize\n\t\t{\n\t\t\tget => (double)GetValue (ClearFontSizeProperty);\n\t\t\tset => SetValue (ClearFontSizeProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the color of the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\tpublic Color ClearTextColor\n\t\t{\n\t\t\tget => (Color)GetValue (ClearTextColorProperty);\n\t\t\tset => SetValue (ClearTextColorProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t///  Gets or sets the watermark image.\n\t\t/// </summary>\n\t\tpublic ImageSource BackgroundImage\n\t\t{\n\t\t\tget => (ImageSource)GetValue (BackgroundImageProperty);\n\t\t\tset => SetValue (BackgroundImageProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t///  Gets or sets the aspect for the watermark image.\n\t\t/// </summary>\n\t\tpublic Aspect BackgroundImageAspect\n\t\t{\n\t\t\tget => (Aspect)GetValue (BackgroundImageAspectProperty);\n\t\t\tset => SetValue (BackgroundImageAspectProperty, value);\n\t\t}\n\n\t\t/// <summary>\n\t\t///  Gets or sets the transparency of the watermark.\n\t\t/// </summary>\n\t\tpublic double BackgroundImageOpacity\n\t\t{\n\t\t\tget => (double)GetValue (BackgroundImageOpacityProperty);\n\t\t\tset => SetValue (BackgroundImageOpacityProperty, value);\n\t\t}\n\n\t\tpublic ICommand ClearedCommand\n\t\t{\n\t\t\tget => (ICommand)GetValue (ClearedCommandProperty);\n\t\t\tset => SetValue (ClearedCommandProperty, value);\n\t\t}\n\n\t\tpublic ICommand StrokeCompletedCommand\n\t\t{\n\t\t\tget => (ICommand)GetValue (StrokeCompletedCommandProperty);\n\t\t\tset => SetValue (StrokeCompletedCommandProperty, value);\n\t\t}\n\n\t\tpublic event EventHandler StrokeCompleted;\n\n\t\tpublic event EventHandler Cleared;\n\n\t\tpublic void Clear ()\n\t\t{\n\t\t\tSignaturePadCanvas.Clear ();\n\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified size.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Size size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified scale.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified size with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Size size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified scale with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Color fillColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, fillColor, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified size with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Color fillColor, Size size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, fillColor, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified scale with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, Color strokeColor, Color fillColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, fillColor, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature using the specified settings.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, ImageConstructionSettings settings)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, settings);\n\t\t}\n\n\t\tprivate void OnClearTapped ()\n\t\t{\n\t\t\tClear ();\n\t\t}\n\n\t\tprivate void OnSignatureCleared ()\n\t\t{\n\t\t\tUpdateBindableProperties ();\n\n\t\t\tUpdateUi ();\n\n\t\t\tCleared?.Invoke (this, EventArgs.Empty);\n\n\t\t\tif (ClearedCommand != null && ClearedCommand.CanExecute (null))\n\t\t\t{\n\t\t\t\tClearedCommand.Execute (null);\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnSignatureStrokeCompleted ()\n\t\t{\n\t\t\tUpdateBindableProperties ();\n\n\t\t\tUpdateUi ();\n\n\t\t\tStrokeCompleted?.Invoke (this, EventArgs.Empty);\n\n\t\t\tif (StrokeCompletedCommand != null && StrokeCompletedCommand.CanExecute (null))\n\t\t\t{\n\t\t\t\tStrokeCompletedCommand.Execute (null);\n\t\t\t}\n\t\t}\n\n\t\tprivate void UpdateBindableProperties ()\n\t\t{\n\t\t\tSetValue (IsBlankPropertyKey, SignaturePadCanvas.IsBlank);\n\t\t}\n\n\t\tprivate void UpdateUi ()\n\t\t{\n\t\t\tClearLabel.IsVisible = !IsBlank;\n\t\t}\n\n\t\tprivate static void OnPaddingChanged (BindableObject bindable, object oldValue, object newValue)\n\t\t{\n\t\t\t((SignaturePadView)bindable).OnPaddingChanged ();\n\t\t}\n\n\t\tprivate void OnPaddingChanged ()\n\t\t{\n\t\t\tvar padding = Padding;\n\t\t\tvar spacing = SignatureLineSpacing;\n\n\t\t\tvar ignorePadding = new Thickness (-padding.Left, -padding.Top, -padding.Right, -padding.Bottom);\n\n\t\t\tSignatureLine.Margin = new Thickness (0, spacing, 0, spacing);\n\t\t\tBackgroundImageView.Margin = ignorePadding;\n\t\t\tSignaturePadCanvas.Margin = ignorePadding;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Forms.UWP/SignaturePad.Forms.UWP.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>uap10.0.10240</TargetFramework>\n    <RootNamespace>SignaturePad.Forms</RootNamespace>\n    <AssemblyName>SignaturePad.Forms</AssemblyName>\n    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>\n    <DocumentationFile Condition=\" '$(Configuration)' == 'Release' \">bin\\$(Configuration)\\$(AssemblyName).xml</DocumentationFile>\n    <AssemblyVersion>1.0.0</AssemblyVersion>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <Version>1.0.0</Version>\n    <PackageId>Xamarin.Controls.SignaturePad.Forms</PackageId>\n    <Title>SignaturePad for Xamarin.Forms</Title>\n    <Product>$(AssemblyName) ($(TargetFramework))</Product>\n    <Authors>Microsoft</Authors>\n    <Owners>Microsoft</Owners>\n    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>\n    <Summary>Makes capturing, saving, and displaying signatures extremely simple.</Summary>\n    <Description>Makes capturing, saving, and displaying signatures extremely simple.</Description>\n    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>\n    <NeutralLanguage>en</NeutralLanguage>\n    <PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=874510</PackageIconUrl>\n    <RepositoryUrl>https://go.microsoft.com/fwlink/?linkid=874507</RepositoryUrl>\n    <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=874507</PackageProjectUrl>\n    <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</PackageLicenseUrl>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</PackageReleaseNotes>\n    <PackageTags>xamarin,signature,handwriting,windows,ios,android,uwp</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"MSBuild.Sdk.Extras\" Version=\"1.4.0\" PrivateAssets=\"All\" />\n    <PackageReference Include=\"Microsoft.NETCore.UniversalWindowsPlatform\" Version=\"6.0.8\" />\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n    <ProjectReference Include=\"..\\SignaturePad.UWP\\SignaturePad.UWP.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <Compile Include=\"..\\SignaturePad.Forms.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n    <Compile Include=\"..\\SignaturePad.Forms.Platform.Shared\\**\\*.cs\" Link=\"%(filename).platform%(Extension)\" />\n  </ItemGroup>\n\n  <Import Project=\"$(MSBuildSDKExtrasTargets)\" Condition=\"Exists('$(MSBuildSDKExtrasTargets)')\" />\n\n</Project>"
  },
  {
    "path": "src/SignaturePad.Forms.iOS/SignaturePad.Forms.iOS.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>xamarin.ios1.0</TargetFramework>\n    <RootNamespace>SignaturePad.Forms</RootNamespace>\n    <AssemblyName>SignaturePad.Forms</AssemblyName>\n    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>\n    <MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);VSX1000</MSBuildWarningsAsMessages>\n    <DocumentationFile Condition=\" '$(Configuration)' == 'Release' \">bin\\$(Configuration)\\$(AssemblyName).xml</DocumentationFile>\n    <AssemblyVersion>1.0.0</AssemblyVersion>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <Version>1.0.0</Version>\n    <PackageId>Xamarin.Controls.SignaturePad.Forms</PackageId>\n    <Title>SignaturePad for Xamarin.Forms</Title>\n    <Product>$(AssemblyName) ($(TargetFramework))</Product>\n    <Authors>Microsoft</Authors>\n    <Owners>Microsoft</Owners>\n    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>\n    <Summary>Makes capturing, saving, and displaying signatures extremely simple.</Summary>\n    <Description>Makes capturing, saving, and displaying signatures extremely simple.</Description>\n    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>\n    <NeutralLanguage>en</NeutralLanguage>\n    <PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=874510</PackageIconUrl>\n    <RepositoryUrl>https://go.microsoft.com/fwlink/?linkid=874507</RepositoryUrl>\n    <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=874507</PackageProjectUrl>\n    <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</PackageLicenseUrl>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</PackageReleaseNotes>\n    <PackageTags>xamarin,signature,handwriting,windows,ios,android,uwp</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"MSBuild.Sdk.Extras\" Version=\"1.4.0\" PrivateAssets=\"All\" />\n    <PackageReference Include=\"Xamarin.Forms\" Version=\"2.5.0.280555\" />\n    <ProjectReference Include=\"..\\SignaturePad.iOS\\SignaturePad.iOS.csproj\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <Compile Include=\"..\\SignaturePad.Forms.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n    <Compile Include=\"..\\SignaturePad.Forms.Platform.Shared\\**\\*.cs\" Link=\"%(filename).platform%(Extension)\" />\n  </ItemGroup>\n\n  <Import Project=\"$(MSBuildSDKExtrasTargets)\" Condition=\"Exists('$(MSBuildSDKExtrasTargets)')\" />\n\n</Project>"
  },
  {
    "path": "src/SignaturePad.InkPresenter.Shared/InkPresenter.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\n#if __ANDROID__\nusing NativeRect = System.Drawing.RectangleF;\nusing NativeSize = System.Drawing.SizeF;\nusing NativePoint = System.Drawing.PointF;\nusing NativeColor = Android.Graphics.Color;\nusing NativeImage = Android.Graphics.Bitmap;\nusing NativePath = Android.Graphics.Path;\n#elif __IOS__\nusing NativeRect = CoreGraphics.CGRect;\nusing NativeSize = CoreGraphics.CGSize;\nusing NativePoint = CoreGraphics.CGPoint;\nusing NativeColor = UIKit.UIColor;\nusing NativeImage = UIKit.UIImage;\nusing NativePath = UIKit.UIBezierPath;\n#elif WINDOWS_PHONE_APP\nusing NativeRect = Windows.Foundation.Rect;\nusing NativeSize = Windows.Foundation.Size;\nusing NativePoint = Windows.Foundation.Point;\nusing NativeColor = Windows.UI.Color;\nusing NativeImage = Windows.UI.Xaml.Media.Imaging.WriteableBitmap;\nusing NativePath = Windows.UI.Xaml.Media.PathGeometry;\n#endif\n\nnamespace Xamarin.Controls\n{\n\tinternal partial class InkPresenter\n\t{\n\t\tprivate const float MinimumPointDistance = 2.0f;\n\n\t\tpublic static float ScreenDensity;\n\n\t\tprivate readonly List<InkStroke> paths = new List<InkStroke> ();\n\t\tprivate InkStroke currentPath;\n\n\t\t// used to determine rectangle that needs to be redrawn\n\t\tprivate float dirtyRectLeft;\n\t\tprivate float dirtyRectTop;\n\t\tprivate float dirtyRectRight;\n\t\tprivate float dirtyRectBottom;\n\n\t\tprivate NativeImage bitmapBuffer;\n\n\t\t// public properties\n\n\t\tpublic NativeColor StrokeColor { get; set; } = ImageConstructionSettings.Black;\n\n\t\tpublic float StrokeWidth { get; set; } = 1f;\n\n\t\t// private properties\n\n#if __IOS__\n\t\tprivate float Width => (float)Bounds.Width;\n\n\t\tprivate float Height => (float)Bounds.Height;\n#endif\n\n\t\tprivate bool ShouldRedrawBufferImage\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tvar sizeChanged = false;\n\t\t\t\tif (bitmapBuffer != null)\n\t\t\t\t{\n\t\t\t\t\tvar s = bitmapBuffer.GetSize ();\n\t\t\t\t\tsizeChanged = s.Width != Width || s.Height != Height;\n\t\t\t\t}\n\n\t\t\t\treturn sizeChanged ||\n\t\t\t\t\t(bitmapBuffer != null && paths.Count == 0) ||\n\t\t\t\t\tpaths.Any (p => p.IsDirty);\n\t\t\t}\n\t\t}\n\n\t\tprivate NativeRect DirtyRect\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tvar x = Math.Min (dirtyRectLeft, dirtyRectRight);\n\t\t\t\tvar y = Math.Min (dirtyRectTop, dirtyRectBottom);\n\t\t\t\tvar w = Math.Abs (dirtyRectRight - dirtyRectLeft);\n\t\t\t\tvar h = Math.Abs (dirtyRectBottom - dirtyRectTop);\n\t\t\t\tvar half = StrokeWidth / 2f;\n\t\t\t\treturn new NativeRect (x - half, y - half, w + StrokeWidth, h + StrokeWidth);\n\t\t\t}\n\t\t}\n\n\t\t// public events\n\n\t\tpublic event EventHandler StrokeCompleted;\n\n\t\t// public methods\n\n\t\tpublic IReadOnlyList<InkStroke> GetStrokes ()\n\t\t{\n\t\t\treturn paths;\n\t\t}\n\n\t\tpublic void Clear ()\n\t\t{\n\t\t\tpaths.Clear ();\n\t\t\tcurrentPath = null;\n\n\t\t\tthis.Invalidate ();\n\t\t}\n\n\t\tpublic void AddStroke (NativePoint[] strokePoints, NativeColor color, float width)\n\t\t{\n\t\t\tif (AddStrokeInternal (strokePoints, color, width))\n\t\t\t{\n\t\t\t\tthis.Invalidate ();\n\t\t\t}\n\t\t}\n\n\t\tpublic void AddStrokes (IEnumerable<NativePoint[]> strokes, NativeColor color, float width)\n\t\t{\n\t\t\tvar changed = false;\n\n\t\t\tforeach (var stroke in strokes)\n\t\t\t{\n\t\t\t\tif (AddStrokeInternal (stroke, color, width))\n\t\t\t\t{\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (changed)\n\t\t\t{\n\t\t\t\tthis.Invalidate ();\n\t\t\t}\n\t\t}\n\n\t\tprivate bool AddStrokeInternal (IEnumerable<NativePoint> points, NativeColor color, float width)\n\t\t{\n\t\t\tvar strokePoints = points?.ToList ();\n\n\t\t\tif (strokePoints == null || strokePoints.Count == 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar newpath = new NativePath ();\n\t\t\tnewpath.MoveTo (strokePoints[0].X, strokePoints[0].Y);\n\t\t\tforeach (var point in strokePoints.Skip (1))\n\t\t\t{\n\t\t\t\tnewpath.LineTo (point.X, point.Y);\n\t\t\t}\n\n\t\t\tpaths.Add (new InkStroke (newpath, strokePoints, color, width));\n\n\t\t\treturn true;\n\t\t}\n\n\t\t// private methods\n\n\t\tprivate bool HasMovedFarEnough (InkStroke stroke, double touchX, double touchY)\n\t\t{\n\t\t\tvar lastPoint = stroke.GetPoints ().LastOrDefault ();\n\t\t\tvar deltaX = touchX - lastPoint.X;\n\t\t\tvar deltaY = touchY - lastPoint.Y;\n\n\t\t\tvar distance = Math.Sqrt (Math.Pow (deltaX, 2) + Math.Pow (deltaY, 2));\n\t\t\treturn distance >= MinimumPointDistance;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Update the bounds for the rectangle to be redrawn if necessary for the given point.\n\t\t/// </summary>\n\t\tprivate void UpdateBounds (NativePoint touch)\n\t\t{\n\t\t\tUpdateBounds ((float)touch.X, (float)touch.Y);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Update the bounds for the rectangle to be redrawn if necessary for the given point.\n\t\t/// </summary>\n\t\tprivate void UpdateBounds (float touchX, float touchY)\n\t\t{\n\t\t\tif (touchX < dirtyRectLeft)\n\t\t\t\tdirtyRectLeft = touchX;\n\t\t\telse if (touchX > dirtyRectRight)\n\t\t\t\tdirtyRectRight = touchX;\n\n\t\t\tif (touchY < dirtyRectTop)\n\t\t\t\tdirtyRectTop = touchY;\n\t\t\telse if (touchY > dirtyRectBottom)\n\t\t\t\tdirtyRectBottom = touchY;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Set the bounds for the rectangle that will need to be redrawn to show the drawn path.\n\t\t/// </summary>\n\t\tprivate void ResetBounds (NativePoint touch)\n\t\t{\n\t\t\tResetBounds ((float)touch.X, (float)touch.Y);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Set the bounds for the rectangle that will need to be redrawn to show the drawn path.\n\t\t/// </summary>\n\t\tprivate void ResetBounds (float touchX, float touchY)\n\t\t{\n\t\t\tdirtyRectLeft = touchX;\n\t\t\tdirtyRectRight = touchX;\n\t\t\tdirtyRectTop = touchY;\n\t\t\tdirtyRectBottom = touchY;\n\t\t}\n\n\t\tprivate void OnStrokeCompleted ()\n\t\t{\n\t\t\tStrokeCompleted?.Invoke (this, EventArgs.Empty);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.InkPresenter.Shared/InkStroke.cs",
    "content": "﻿using System.Collections.Generic;\n\n#if __ANDROID__\nusing NativePoint = System.Drawing.PointF;\nusing NativeColor = Android.Graphics.Color;\nusing NativePath = Android.Graphics.Path;\n#elif __IOS__\nusing NativePoint = CoreGraphics.CGPoint;\nusing NativeColor = UIKit.UIColor;\nusing NativePath = UIKit.UIBezierPath;\n#elif WINDOWS_PHONE_APP\nusing NativePoint = Windows.Foundation.Point;\nusing NativeColor = Windows.UI.Color;\nusing NativePath = Windows.UI.Xaml.Media.PathGeometry;\n#endif\n\nnamespace Xamarin.Controls\n{\n\tinternal class InkStroke\n\t{\n\t\tprivate NativeColor color;\n\t\tprivate float width;\n\t\tprivate IList<NativePoint> inkPoints;\n\n\t\tpublic InkStroke (NativePath path, IList<NativePoint> points, NativeColor color, float width)\n\t\t{\n\t\t\tPath = path;\n\t\t\tinkPoints = points;\n\t\t\tColor = color;\n\t\t\tWidth = width;\n\t\t}\n\n\t\tpublic NativePath Path { get; private set; }\n\n\t\tpublic IList<NativePoint> GetPoints ()\n\t\t{\n\t\t\treturn inkPoints;\n\t\t}\n\n\t\tpublic NativeColor Color\n\t\t{\n\t\t\tget { return color; }\n\t\t\tset\n\t\t\t{\n\t\t\t\tcolor = value;\n\t\t\t\tIsDirty = true;\n\t\t\t}\n\t\t}\n\n\t\tpublic float Width\n\t\t{\n\t\t\tget { return width; }\n\t\t\tset\n\t\t\t{\n\t\t\t\twidth = value;\n\t\t\t\tIsDirty = true;\n\t\t\t}\n\t\t}\n\n\t\tinternal bool IsDirty { get; set; }\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Mac.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26228.10\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.iOS\", \"SignaturePad.iOS\\SignaturePad.iOS.csproj\", \"{BEF71536-787B-431F-AC7F-A6469710D11F}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Android\", \"SignaturePad.Android\\SignaturePad.Android.csproj\", \"{F1A16CB9-A759-42C8-8F0B-3C9698A55336}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms\", \"SignaturePad.Forms\\SignaturePad.Forms.csproj\", \"{B2AF970D-D640-451C-95AF-92AF531B8C1E}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.Droid\", \"SignaturePad.Forms.Droid\\SignaturePad.Forms.Droid.csproj\", \"{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.iOS\", \"SignaturePad.Forms.iOS\\SignaturePad.Forms.iOS.csproj\", \"{B12D20AA-0EDF-4903-B385-BB8090848532}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {C1DC0EAF-7D66-46D7-A4A8-6F84D8E299E3}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "src/SignaturePad.Shared/Extensions.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\n#if __ANDROID__\nusing Android.Graphics;\nusing Android.Views;\n#elif __IOS__\nusing CoreGraphics;\nusing UIKit;\n#elif WINDOWS_PHONE\nusing System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Ink;\nusing System.Windows.Input;\nusing System.Windows.Media;\n#elif WINDOWS_UWP || WINDOWS_APP\nusing Windows.Foundation;\nusing System.Numerics;\nusing Windows.UI;\nusing Windows.UI.Input.Inking;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Media;\nusing Windows.UI.Xaml.Media.Imaging;\n#elif WINDOWS_PHONE_APP\nusing Windows.Foundation;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Media;\nusing Windows.UI.Xaml.Media.Imaging;\n#endif\n\nnamespace Xamarin.Controls\n{\n\tinternal static class Extensions\n\t{\n#if __ANDROID__\n\n\t\tpublic static System.Drawing.SizeF GetSize (this Bitmap image)\n\t\t{\n\t\t\treturn new System.Drawing.SizeF (image.Width, image.Height);\n\t\t}\n\n\t\tpublic static System.Drawing.SizeF GetSize (this View view)\n\t\t{\n\t\t\treturn new System.Drawing.SizeF (view.Width, view.Height);\n\t\t}\n\n#elif __IOS__\n\n\t\tpublic static CGSize GetSize (this UIImage image)\n\t\t{\n\t\t\treturn image.Size;\n\t\t}\n\n\t\tpublic static void Invalidate (this UIView view)\n\t\t{\n\t\t\tview.SetNeedsDisplay ();\n\t\t}\n\n\t\tpublic static void MoveTo (this UIBezierPath path, nfloat x, nfloat y)\n\t\t{\n\t\t\tpath.MoveTo (new CGPoint (x, y));\n\t\t}\n\n\t\tpublic static void LineTo (this UIBezierPath path, nfloat x, nfloat y)\n\t\t{\n\t\t\tpath.AddLineTo (new CGPoint (x, y));\n\t\t}\n\n\t\tpublic static CGSize GetSize (this UIView view)\n\t\t{\n\t\t\treturn view.Bounds.Size;\n\t\t}\n\n#elif WINDOWS_PHONE\n\n\t\tpublic static void MoveTo (this Stroke stroke, double x, double y)\n\t\t{\n\t\t\tstroke.StylusPoints.Add (new StylusPoint (x, y));\n\t\t}\n\n\t\tpublic static void LineTo (this Stroke stroke, double x, double y)\n\t\t{\n\t\t\tstroke.StylusPoints.Add (new StylusPoint (x, y));\n\t\t}\n\n\t\tpublic static void AddStrokes (this InkPresenter inkPresenter, IList<Point[]> strokes, Color color, float width)\n\t\t{\n\t\t\tvar strokeCollection = new StrokeCollection ();\n\t\t\tforeach (var stroke in strokes.Where(s => s.Length > 0))\n\t\t\t{\n\t\t\t\tvar pointCollection = new StylusPointCollection ();\n\t\t\t\tforeach (var point in stroke)\n\t\t\t\t{\n\t\t\t\t\tpointCollection.Add (new StylusPoint (point.X, point.Y));\n\t\t\t\t}\n\n\t\t\t\tvar newStroke = new Stroke (pointCollection);\n\t\t\t\tstrokeCollection.Add (newStroke);\n\n\t\t\t\tnewStroke.DrawingAttributes = new DrawingAttributes\n\t\t\t\t{\n\t\t\t\t\tColor = color,\n\t\t\t\t\tOutlineColor = color,\n\t\t\t\t\tWidth = width,\n\t\t\t\t\tHeight = width\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tinkPresenter.Strokes = strokeCollection;\n\t\t}\n\n\t\tpublic static IList<Stroke> GetStrokes (this InkPresenter inkPresenter)\n\t\t{\n\t\t\treturn inkPresenter.Strokes;\n\t\t}\n\n\t\tpublic static IEnumerable<Point> GetPoints (this Stroke stroke)\n\t\t{\n\t\t\treturn stroke.StylusPoints.Select (p => new Point (p.X, p.Y));\n\t\t}\n\n\t\tpublic static Size GetSize (this FrameworkElement element)\n\t\t{\n\t\t\treturn new Size (element.ActualWidth, element.ActualHeight);\n\t\t}\n\n#elif WINDOWS_PHONE_APP || WINDOWS_APP\n\n\t\tpublic static void MoveTo (this List<Point> stroke, double x, double y)\n\t\t{\n\t\t\tstroke.Add (new Point (x, y));\n\t\t}\n\n\t\tpublic static void LineTo (this List<Point> stroke, double x, double y)\n\t\t{\n\t\t\tstroke.Add (new Point (x, y));\n\t\t}\n\n\t\tpublic static void MoveTo (this PathGeometry stroke, double x, double y)\n\t\t{\n\t\t\tvar figure = new PathFigure ();\n\t\t\tfigure.StartPoint = new Point (x, y);\n\t\t\tvar segment = new PolyLineSegment ();\n\t\t\tsegment.Points.Add (new Point (x, y));\n\t\t\tfigure.Segments.Add (segment);\n\t\t\tstroke.Figures.Add (figure);\n\t\t}\n\n\t\tpublic static void LineTo (this PathGeometry stroke, double x, double y)\n\t\t{\n\t\t\tvar figure = stroke.Figures.LastOrDefault ();\n\t\t\tif (figure == null)\n\t\t\t{\n\t\t\t\tfigure = new PathFigure ();\n\t\t\t\tstroke.Figures.Add (figure);\n\t\t\t}\n\t\t\tvar segment = figure.Segments.LastOrDefault () as PolyLineSegment;\n\t\t\tif (segment == null)\n\t\t\t{\n\t\t\t\tsegment = new PolyLineSegment ();\n\t\t\t\tfigure.Segments.Add (segment);\n\t\t\t}\n\t\t\tsegment.Points.Add (new Point (x, y));\n\t\t}\n\n\t\tpublic static Size GetSize (this FrameworkElement element)\n\t\t{\n\t\t\treturn new Size (element.ActualWidth, element.ActualHeight);\n\t\t}\n\n\t\tpublic static Size GetSize (this WriteableBitmap image)\n\t\t{\n\t\t\treturn new Size (image.PixelWidth, image.PixelHeight);\n\t\t}\n\n#if WINDOWS_APP\n\n\t\tpublic static IEnumerable<Point> GetPoints (this InkStroke stroke)\n\t\t{\n\t\t\tvar empty = new Point ();\n\n\t\t\tvar segments = stroke.GetRenderingSegments ();\n\t\t\tif (segments.Any (s => s.BezierControlPoint1 != empty || s.BezierControlPoint2 != empty))\n\t\t\t{\n\t\t\t\t// we assume strokes with bezier controls are generated by the inking\n\t\t\t\t// so we know that the detail will be low - thus we smooth\n\t\t\t\treturn PathSmoothing.BezierToLinear (segments, 0.1f);\n\t\t\t}\n\t\t\treturn segments.Select (p => p.Position);\n\t\t}\n\n#endif\n\n#elif WINDOWS_UWP\n\n\t\tprivate const float DefaultPressure = 0.5f;\n\n\t\tpublic static void MoveTo (this List<Point> stroke, double x, double y)\n\t\t{\n\t\t\tstroke.Add (new Point (x, y));\n\t\t}\n\n\t\tpublic static void LineTo (this List<Point> stroke, double x, double y)\n\t\t{\n\t\t\tstroke.Add (new Point (x, y));\n\t\t}\n\n\t\tpublic static IReadOnlyList<InkStroke> GetStrokes (this InkPresenter inkPresenter)\n\t\t{\n\t\t\treturn inkPresenter.StrokeContainer.GetStrokes ();\n\t\t}\n\n\t\tpublic static void AddStrokes (this InkPresenter inkPresenter, IList<Point[]> strokes, Color color, float width)\n\t\t{\n\t\t\tvar strokeBuilder = new InkStrokeBuilder ();\n\n\t\t\tvar da = inkPresenter.CopyDefaultDrawingAttributes ();\n\t\t\tda.Color = color;\n\t\t\tda.Size = new Size (width, width);\n\t\t\tstrokeBuilder.SetDefaultDrawingAttributes (da);\n\n\t\t\tvar newStrokes = strokes.Where (s => s.Length > 0).Select (s =>\n\t\t\t{\n\t\t\t\tvar points = s.Select (p => new InkPoint (p, DefaultPressure));\n\t\t\t\treturn strokeBuilder.CreateStrokeFromInkPoints (points, Matrix3x2.Identity);\n\t\t\t});\n\n\t\t\tinkPresenter.StrokeContainer.AddStrokes (newStrokes);\n\t\t}\n\n\t\tpublic static IEnumerable<Point> GetPoints (this InkStroke stroke)\n\t\t{\n\t\t\treturn stroke.GetInkPoints ().Select (p => p.Position);\n\t\t}\n\n\t\tpublic static Size GetSize (this FrameworkElement element)\n\t\t{\n\t\t\treturn new Size (element.ActualWidth, element.ActualHeight);\n\t\t}\n\n#endif\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Shared/ImageConstructionSettings.cs",
    "content": "﻿using System;\n\n#if __ANDROID__\nusing NativeSize = System.Drawing.SizeF;\nusing NativeColor = Android.Graphics.Color;\nusing NativeNullableColor = System.Nullable<Android.Graphics.Color>;\n#elif __IOS__\nusing NativeSize = CoreGraphics.CGSize;\nusing NativeColor = UIKit.UIColor;\nusing NativeNullableColor = UIKit.UIColor;\n#elif WINDOWS_PHONE\nusing NativeSize = System.Windows.Size;\nusing NativeColor = System.Windows.Media.Color;\nusing NativeNullableColor = System.Nullable<System.Windows.Media.Color>;\n#elif WINDOWS_UWP || WINDOWS_APP\nusing NativeSize = Windows.Foundation.Size;\nusing NativeColor = Windows.UI.Color;\nusing NativeNullableColor = System.Nullable<Windows.UI.Color>;\n#elif WINDOWS_PHONE_APP\nusing NativeSize = Windows.Foundation.Size;\nusing NativeColor = Windows.UI.Color;\nusing NativeNullableColor = System.Nullable<Windows.UI.Color>;\n#endif\n\nnamespace Xamarin.Controls\n{\n\tpublic enum SizeOrScaleType\n\t{\n\t\tSize,\n\t\tScale\n\t}\n\n\tpublic struct SizeOrScale\n\t{\n\t\tpublic SizeOrScale (float xy, SizeOrScaleType type)\n\t\t{\n\t\t\tX = xy;\n\t\t\tY = xy;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = true;\n\t\t}\n\n\t\tpublic SizeOrScale (float xy, SizeOrScaleType type, bool keepAspectRatio)\n\t\t{\n\t\t\tX = xy;\n\t\t\tY = xy;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = keepAspectRatio;\n\t\t}\n\n\t\tpublic SizeOrScale (NativeSize size, SizeOrScaleType type)\n\t\t{\n\t\t\tX = (float)size.Width;\n\t\t\tY = (float)size.Height;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = true;\n\t\t}\n\n\t\tpublic SizeOrScale (NativeSize size, SizeOrScaleType type, bool keepAspectRatio)\n\t\t{\n\t\t\tX = (float)size.Width;\n\t\t\tY = (float)size.Height;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = keepAspectRatio;\n\t\t}\n\n\t\tpublic SizeOrScale (float x, float y, SizeOrScaleType type)\n\t\t{\n\t\t\tX = x;\n\t\t\tY = y;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = true;\n\t\t}\n\n\t\tpublic SizeOrScale (float x, float y, SizeOrScaleType type, bool keepAspectRatio)\n\t\t{\n\t\t\tX = x;\n\t\t\tY = y;\n\t\t\tType = type;\n\t\t\tKeepAspectRatio = keepAspectRatio;\n\t\t}\n\n\t\tpublic float X { get; set; }\n\n\t\tpublic float Y { get; set; }\n\n\t\tpublic SizeOrScaleType Type { get; set; }\n\n\t\tpublic bool KeepAspectRatio { get; set; }\n\n\t\tpublic bool IsValid => X > 0 && Y > 0;\n\n\t\tpublic NativeSize GetScale (float width, float height)\n\t\t{\n\t\t\tif (Type == SizeOrScaleType.Scale)\n\t\t\t{\n\t\t\t\treturn new NativeSize (X, Y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new NativeSize (X / width, Y / height);\n\t\t\t}\n\t\t}\n\n\t\tpublic NativeSize GetSize (float width, float height)\n\t\t{\n\t\t\tif (Type == SizeOrScaleType.Scale)\n\t\t\t{\n\t\t\t\treturn new NativeSize (width * X, height * Y);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn new NativeSize (X, Y);\n\t\t\t}\n\t\t}\n\n\t\tpublic static implicit operator SizeOrScale (float scale)\n\t\t{\n\t\t\treturn new SizeOrScale (scale, SizeOrScaleType.Scale);\n\t\t}\n\n\t\tpublic static implicit operator SizeOrScale (NativeSize size)\n\t\t{\n\t\t\treturn new SizeOrScale ((float)size.Width, (float)size.Height, SizeOrScaleType.Size);\n\t\t}\n\t}\n\n\tpublic struct ImageConstructionSettings\n\t{\n#if __IOS__ || __ANDROID__\n\t\tinternal static readonly NativeColor Black = NativeColor.Black;\n\t\tinternal static readonly NativeColor Transparent = new NativeColor (0, 0, 0, 0);\n#elif WINDOWS_PHONE || WINDOWS_UWP || WINDOWS_PHONE_APP || WINDOWS_APP\n\t\tinternal static readonly NativeColor Black = NativeColor.FromArgb (255, 0, 0, 0);\n\t\tinternal static readonly NativeColor Transparent = NativeColor.FromArgb (0, 0, 0, 0);\n#endif\n\n\t\tpublic static readonly bool DefaultShouldCrop = true;\n\t\tpublic static readonly SizeOrScale DefaultSizeOrScale = 1f;\n\t\tpublic static readonly NativeColor DefaultStrokeColor = Black;\n\t\tpublic static readonly NativeColor DefaultBackgroundColor = Transparent;\n\t\tpublic static readonly float DefaultStrokeWidth = 2f;\n\t\tpublic static readonly float DefaultPadding = 5f;\n\n\t\tpublic bool? ShouldCrop { get; set; }\n\n\t\tpublic SizeOrScale? DesiredSizeOrScale { get; set; }\n\n\t\tpublic NativeNullableColor StrokeColor { get; set; }\n\n\t\tpublic NativeNullableColor BackgroundColor { get; set; }\n\n\t\tpublic float? StrokeWidth { get; set; }\n\n\t\tpublic float? Padding { get; set; }\n\n\t\tinternal void ApplyDefaults ()\n\t\t{\n\t\t\tApplyDefaults (DefaultStrokeWidth, DefaultStrokeColor);\n\t\t}\n\n\t\tinternal void ApplyDefaults (float strokeWidth, NativeColor strokeColor)\n\t\t{\n\t\t\tShouldCrop = ShouldCrop ?? DefaultShouldCrop;\n\t\t\tDesiredSizeOrScale = DesiredSizeOrScale ?? DefaultSizeOrScale;\n\t\t\tStrokeColor = StrokeColor ?? strokeColor;\n\t\t\tBackgroundColor = BackgroundColor ?? DefaultBackgroundColor;\n\t\t\tStrokeWidth = StrokeWidth ?? strokeWidth;\n\t\t\tPadding = Padding ?? DefaultPadding;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Shared/PathSmoothing.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\n\n#if __ANDROID__\nusing NativePoint = System.Drawing.PointF;\nusing NativePath = Android.Graphics.Path;\n#elif __IOS__\nusing NativePoint = CoreGraphics.CGPoint;\nusing NativePath = UIKit.UIBezierPath;\n#elif WINDOWS_PHONE\nusing System.Windows.Ink;\nusing NativePoint = System.Windows.Point;\nusing NativePath = System.Windows.Ink.Stroke;\nusing InkStroke = System.Windows.Ink.Stroke;\n#elif WINDOWS_UWP || WINDOWS_APP\nusing Windows.UI.Input.Inking;\nusing NativePoint = Windows.Foundation.Point;\nusing NativePath = System.Collections.Generic.List<Windows.Foundation.Point>;\nusing InkStroke = Windows.UI.Input.Inking.InkStroke;\n#elif WINDOWS_PHONE_APP\nusing NativePoint = Windows.Foundation.Point;\nusing NativePath = Windows.UI.Xaml.Media.PathGeometry;\n#endif\n\nnamespace Xamarin.Controls\n{\n\tinternal static class PathSmoothing\n\t{\n\t\t/// <summary>\n\t\t/// Obtain a smoothed path with the specified granularity from the current path using Catmull-Rom spline.\n\t\t/// Also outputs a List of the points corresponding to the smoothed path.\n\t\t/// </summary>\n\t\t/// <remarks>\n\t\t/// Implemented using a modified version of the code in the solution at \n\t\t/// http://stackoverflow.com/questions/8702696/drawing-smooth-curves-methods-needed\n\t\t/// </remarks>\n\t\tpublic static InkStroke SmoothedPathWithGranularity (InkStroke currentPath, int granularity)\n\t\t{\n\t\t\tvar currentPoints = currentPath.GetPoints ().ToList ();\n\n\t\t\tNativePath smoothedPath;\n\t\t\tList<NativePoint> smoothedPoints;\n\t\t\tSmoothedPathWithGranularity (currentPoints, granularity, out smoothedPath, out smoothedPoints);\n\t\t\tif (smoothedPath == null)\n\t\t\t{\n\t\t\t\treturn currentPath;\n\t\t\t}\n\n\t\t\t// create the new path with the old attributes\n#if __ANDROID__ || __IOS__ || WINDOWS_PHONE_APP\n\t\t\treturn new InkStroke (smoothedPath, smoothedPoints.ToList (), currentPath.Color, currentPath.Width);\n#elif WINDOWS_PHONE\n\t\t\tvar da = currentPath.DrawingAttributes;\n\t\t\tsmoothedPath.DrawingAttributes = new DrawingAttributes\n\t\t\t{\n\t\t\t\tColor = da.Color,\n\t\t\t\tOutlineColor = da.OutlineColor,\n\t\t\t\tWidth = da.Width,\n\t\t\t\tHeight = da.Height,\n\t\t\t};\n\t\t\treturn smoothedPath;\n#elif WINDOWS_UWP || WINDOWS_APP\n\t\t\tvar da = currentPath.DrawingAttributes;\n\t\t\tvar builder = new InkStrokeBuilder ();\n\t\t\tbuilder.SetDefaultDrawingAttributes (new InkDrawingAttributes\n\t\t\t{\n\t\t\t\tColor = da.Color,\n\t\t\t\tSize = da.Size\n\t\t\t});\n\t\t\treturn builder.CreateStroke (smoothedPath);\n#endif\n\t\t}\n\n\t\tpublic static void SmoothedPathWithGranularity (List<NativePoint> currentPoints, int granularity, out NativePath smoothedPath, out List<NativePoint> smoothedPoints)\n\t\t{\n\t\t\t// not enough points to smooth effectively, so return the original path and points.\n\t\t\tif (currentPoints.Count < 4)\n\t\t\t{\n\t\t\t\tsmoothedPath = null;\n\t\t\t\tsmoothedPoints = null;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// create a new bezier path to hold the smoothed path.\n\t\t\tsmoothedPath = new NativePath ();\n\t\t\tsmoothedPoints = new List<NativePoint> ();\n\n\t\t\t// duplicate the first and last points as control points.\n\t\t\tcurrentPoints.Insert (0, currentPoints[0]);\n\t\t\tcurrentPoints.Add (currentPoints[currentPoints.Count - 1]);\n\n\t\t\t// add the first point\n\t\t\tsmoothedPath.MoveTo (currentPoints[0].X, currentPoints[0].Y);\n\t\t\tsmoothedPoints.Add (currentPoints[0]);\n\n\t\t\tfor (var index = 1; index < currentPoints.Count - 2; index++)\n\t\t\t{\n\t\t\t\tvar p0 = currentPoints[index - 1];\n\t\t\t\tvar p1 = currentPoints[index];\n\t\t\t\tvar p2 = currentPoints[index + 1];\n\t\t\t\tvar p3 = currentPoints[index + 2];\n\n\t\t\t\t// add n points starting at p1 + dx/dy up until p2 using Catmull-Rom splines\n\t\t\t\tfor (var i = 1; i < granularity; i++)\n\t\t\t\t{\n\t\t\t\t\tvar t = (float)i * (1f / (float)granularity);\n\t\t\t\t\tvar tt = t * t;\n\t\t\t\t\tvar ttt = tt * t;\n\n\t\t\t\t\t// intermediate point\n\t\t\t\t\tvar mid = new NativePoint\n\t\t\t\t\t{\n\t\t\t\t\t\tX = 0.5f * (2f * p1.X + (p2.X - p0.X) * t +\n\t\t\t\t\t\t\t(2f * p0.X - 5f * p1.X + 4f * p2.X - p3.X) * tt +\n\t\t\t\t\t\t\t(3f * p1.X - p0.X - 3f * p2.X + p3.X) * ttt),\n\n\t\t\t\t\t\tY = 0.5f * (2 * p1.Y + (p2.Y - p0.Y) * t +\n\t\t\t\t\t\t\t(2 * p0.Y - 5 * p1.Y + 4 * p2.Y - p3.Y) * tt +\n\t\t\t\t\t\t\t(3 * p1.Y - p0.Y - 3 * p2.Y + p3.Y) * ttt)\n\t\t\t\t\t};\n\t\t\t\t\tsmoothedPath.LineTo (mid.X, mid.Y);\n\t\t\t\t\tsmoothedPoints.Add (mid);\n\t\t\t\t}\n\n\t\t\t\t// add p2\n\t\t\t\tsmoothedPath.LineTo (p2.X, p2.Y);\n\t\t\t\tsmoothedPoints.Add (p2);\n\t\t\t}\n\n\t\t\t// add the last point\n\t\t\tvar last = currentPoints[currentPoints.Count - 1];\n\t\t\tsmoothedPath.LineTo (last.X, last.Y);\n\t\t\tsmoothedPoints.Add (last);\n\t\t}\n\n#if WINDOWS_APP\n\n\t\tpublic static List<NativePoint> BezierToLinear (IReadOnlyList<InkStrokeRenderingSegment> segments, float step)\n\t\t{\n\t\t\tvar linear = new List<NativePoint> ();\n\t\t\tlinear.Add (segments[0].Position);\n\n\t\t\tvar prev = segments[0].Position;\n\t\t\tforeach (var segment in segments.Skip (1))\n\t\t\t{\n\t\t\t\tvar t = 0f;\n\t\t\t\twhile (t < 1.0f)\n\t\t\t\t{\n\t\t\t\t\tt += step;\n\n\t\t\t\t\tvar p1 = prev;\n\t\t\t\t\tvar c1 = segment.BezierControlPoint1;\n\t\t\t\t\tvar c2 = segment.BezierControlPoint2;\n\t\t\t\t\tvar p2 = segment.Position;\n\n\t\t\t\t\tlinear.Add (Qubic (t, p1, c1, c2, p2));\n\t\t\t\t}\n\n\t\t\t\tprev = segment.Position;\n\t\t\t}\n\n\t\t\treturn linear;\n\t\t}\n\n\t\tprivate static NativePoint Quadratic (float t, NativePoint p1, NativePoint p2, NativePoint p3)\n\t\t{\n\t\t\treturn new NativePoint\n\t\t\t{\n\t\t\t\tX = (1 - t) * (1 - t) * p1.X + 2 * (1 - t) * t * p2.X + t * t * p3.X,\n\t\t\t\tY = (1 - t) * (1 - t) * p1.Y + 2 * (1 - t) * t * p2.Y + t * t * p3.Y\n\t\t\t};\n\t\t}\n\n\t\tprivate static NativePoint Qubic (float t, NativePoint p0, NativePoint p1, NativePoint p2, NativePoint p3)\n\t\t{\n\t\t\treturn new NativePoint\n\t\t\t{\n\t\t\t\tX = (1 - t) * (1 - t) * (1 - t) * p0.X + 3 * (1 - t) * (1 - t) * t * p1.X + 3 * (1 - t) * t * t * p2.X + t * t * t * p3.X,\n\t\t\t\tY = (1 - t) * (1 - t) * (1 - t) * p0.Y + 3 * (1 - t) * (1 - t) * t * p1.Y + 3 * (1 - t) * t * t * p2.Y + t * t * t * p3.Y\n\t\t\t};\n\t\t}\n\n\t\t// P = (1-t)•A + t•B = (1-t)2•P1 + 2•(1-t) •t•C + t2•P2\n#endif\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Shared/SignatureImageFormat.cs",
    "content": "namespace Xamarin.Controls\n{\n\tpublic enum SignatureImageFormat\n\t{\n\t\tPng,\n\t\tJpeg\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Shared/SignaturePadCanvasView.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing System.IO;\n\n#if __ANDROID__\nusing NativeRect = System.Drawing.RectangleF;\nusing NativePoint = System.Drawing.PointF;\nusing NativeSize = System.Drawing.SizeF;\nusing NativeColor = Android.Graphics.Color;\nusing NativeImage = Android.Graphics.Bitmap;\n#elif __IOS__\nusing NativeRect = CoreGraphics.CGRect;\nusing NativePoint = CoreGraphics.CGPoint;\nusing NativeSize = CoreGraphics.CGSize;\nusing NativeColor = UIKit.UIColor;\nusing NativeImage = UIKit.UIImage;\n#elif WINDOWS_PHONE\nusing NativeRect = System.Windows.Rect;\nusing NativePoint = System.Windows.Point;\nusing NativeSize = System.Windows.Size;\nusing NativeColor = System.Windows.Media.Color;\nusing NativeImage = System.Windows.Media.Imaging.WriteableBitmap;\n#elif WINDOWS_UWP || WINDOWS_APP\nusing NativeRect = Windows.Foundation.Rect;\nusing NativePoint = Windows.Foundation.Point;\nusing NativeSize = Windows.Foundation.Size;\nusing NativeColor = Windows.UI.Color;\nusing NativeImage = Windows.UI.Xaml.Media.Imaging.WriteableBitmap;\n#elif WINDOWS_PHONE_APP\nusing NativeRect = Windows.Foundation.Rect;\nusing NativeSize = Windows.Foundation.Size;\nusing NativePoint = Windows.Foundation.Point;\nusing NativeColor = Windows.UI.Color;\nusing NativeImage = Windows.UI.Xaml.Media.Imaging.WriteableBitmap;\n#endif\n\nnamespace Xamarin.Controls\n{\n\tpartial class SignaturePadCanvasView\n\t{\n\t\tpublic event EventHandler StrokeCompleted;\n\n\t\tpublic event EventHandler Cleared;\n\n\t\tpublic bool IsBlank => inkPresenter == null ? true : inkPresenter.GetStrokes ().Count == 0;\n\n\t\tpublic NativePoint[] Points\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tif (IsBlank)\n\t\t\t\t{\n\t\t\t\t\treturn new NativePoint[0];\n\t\t\t\t}\n\n\t\t\t\t// make a deep copy, with { 0, 0 } line starter\n\t\t\t\treturn inkPresenter.GetStrokes ()\n\t\t\t\t\t.SelectMany (s => new[] { new NativePoint (0, 0) }.Concat (s.GetPoints ()))\n\t\t\t\t\t.Skip (1) // skip the first empty\n\t\t\t\t\t.ToArray ();\n\t\t\t}\n\t\t}\n\n\t\tpublic NativePoint[][] Strokes\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tif (IsBlank)\n\t\t\t\t{\n\t\t\t\t\treturn new NativePoint[0][];\n\t\t\t\t}\n\n\t\t\t\t// make a deep copy\n\t\t\t\treturn inkPresenter.GetStrokes ().Select (s => s.GetPoints ().ToArray ()).ToArray ();\n\t\t\t}\n\t\t}\n\n\t\tpublic NativeRect GetSignatureBounds (float padding = 5f)\n\t\t{\n\t\t\tif (IsBlank)\n\t\t\t{\n\t\t\t\treturn NativeRect.Empty;\n\t\t\t}\n\n\t\t\tvar size = this.GetSize ();\n\t\t\tdouble xMin = size.Width, xMax = 0, yMin = size.Height, yMax = 0;\n\t\t\tforeach (var point in inkPresenter.GetStrokes ().SelectMany (stroke => stroke.GetPoints ()))\n\t\t\t{\n\t\t\t\txMin = point.X <= 0 ? 0 : Math.Min (xMin, point.X);\n\t\t\t\tyMin = point.Y <= 0 ? 0 : Math.Min (yMin, point.Y);\n\t\t\t\txMax = point.X >= size.Width ? size.Width : Math.Max (xMax, point.X);\n\t\t\t\tyMax = point.Y >= size.Height ? size.Height : Math.Max (yMax, point.Y);\n\t\t\t}\n\n\t\t\tvar spacing = (StrokeWidth / 2f) + padding;\n\t\t\txMin = Math.Max (0, xMin - spacing);\n\t\t\tyMin = Math.Max (0, yMin - spacing);\n\t\t\txMax = Math.Min (size.Width, xMax + spacing);\n\t\t\tyMax = Math.Min (size.Height, yMax + spacing);\n\n\t\t\treturn new NativeRect (\n\t\t\t\t(float)xMin,\n\t\t\t\t(float)yMin,\n\t\t\t\t(float)xMax - (float)xMin,\n\t\t\t\t(float)yMax - (float)yMin);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified size.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified scale.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio),\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified size with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified scale with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeColor fillColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio),\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor,\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified size with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeColor fillColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified scale with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeColor fillColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImage (new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature using the specified settings.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (ImageConstructionSettings settings)\n\t\t{\n\t\t\tNativeSize scale;\n\t\t\tNativeRect signatureBounds;\n\t\t\tNativeSize imageSize;\n\t\t\tfloat strokeWidth;\n\t\t\tNativeColor strokeColor;\n\t\t\tNativeColor backgroundColor;\n\n\t\t\tif (GetImageConstructionArguments (settings, out scale, out signatureBounds, out imageSize, out strokeWidth, out strokeColor, out backgroundColor))\n\t\t\t{\n\t\t\t\treturn GetImageInternal (scale, signatureBounds, imageSize, strokeWidth, strokeColor, backgroundColor);\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified size.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified scale.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio),\n\t\t\t\tStrokeColor = strokeColor\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified size with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified scale with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeColor fillColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (1f, SizeOrScaleType.Scale, keepAspectRatio),\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified size with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeColor fillColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (size, SizeOrScaleType.Size, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature at the specified scale with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeColor fillColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn GetImageStreamAsync (format, new ImageConstructionSettings\n\t\t\t{\n\t\t\t\tShouldCrop = shouldCrop,\n\t\t\t\tStrokeColor = strokeColor,\n\t\t\t\tBackgroundColor = fillColor,\n\t\t\t\tDesiredSizeOrScale = new SizeOrScale (scale, SizeOrScaleType.Scale, keepAspectRatio)\n\t\t\t});\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image stream of the currently drawn signature using the specified settings.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, ImageConstructionSettings settings)\n\t\t{\n\t\t\tNativeSize scale;\n\t\t\tNativeRect signatureBounds;\n\t\t\tNativeSize imageSize;\n\t\t\tfloat strokeWidth;\n\t\t\tNativeColor strokeColor;\n\t\t\tNativeColor backgroundColor;\n\n\t\t\tif (GetImageConstructionArguments (settings, out scale, out signatureBounds, out imageSize, out strokeWidth, out strokeColor, out backgroundColor))\n\t\t\t{\n\t\t\t\treturn GetImageStreamInternal (format, scale, signatureBounds, imageSize, strokeWidth, strokeColor, backgroundColor);\n\t\t\t}\n\n\t\t\treturn Task.FromResult<Stream> (null);\n\t\t}\n\n\t\tprivate bool GetImageConstructionArguments (ImageConstructionSettings settings, out NativeSize scale, out NativeRect signatureBounds, out NativeSize imageSize, out float strokeWidth, out NativeColor strokeColor, out NativeColor backgroundColor)\n\t\t{\n\t\t\tsettings.ApplyDefaults ((float)StrokeWidth, StrokeColor);\n\n\t\t\tif (IsBlank || settings.DesiredSizeOrScale?.IsValid != true)\n\t\t\t{\n\t\t\t\tscale = default (NativeSize);\n\t\t\t\tsignatureBounds = default (NativeRect);\n\t\t\t\timageSize = default (NativeSize);\n\t\t\t\tstrokeWidth = default (float);\n\t\t\t\tstrokeColor = default (NativeColor);\n\t\t\t\tbackgroundColor = default (NativeColor);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar sizeOrScale = settings.DesiredSizeOrScale.Value;\n\t\t\tvar viewSize = this.GetSize ();\n\n\t\t\timageSize = sizeOrScale.GetSize ((float)viewSize.Width, (float)viewSize.Height);\n\t\t\tscale = sizeOrScale.GetScale ((float)imageSize.Width, (float)imageSize.Height);\n\n\t\t\tif (settings.ShouldCrop == true)\n\t\t\t{\n\t\t\t\tsignatureBounds = GetSignatureBounds (settings.Padding.Value);\n\n\t\t\t\tif (sizeOrScale.Type == SizeOrScaleType.Size)\n\t\t\t\t{\n\t\t\t\t\t// if a specific size was set, scale to that\n\t\t\t\t\tvar scaleX = imageSize.Width / (float)signatureBounds.Width;\n\t\t\t\t\tvar scaleY = imageSize.Height / (float)signatureBounds.Height;\n\t\t\t\t\tif (sizeOrScale.KeepAspectRatio)\n\t\t\t\t\t{\n\t\t\t\t\t\tscaleX = scaleY = Math.Min ((float)scaleX, (float)scaleY);\n\t\t\t\t\t}\n\t\t\t\t\tscale = new NativeSize ((float)scaleX, (float)scaleY);\n\t\t\t\t}\n\t\t\t\telse if (sizeOrScale.Type == SizeOrScaleType.Scale)\n\t\t\t\t{\n\t\t\t\t\timageSize.Width = signatureBounds.Width * scale.Width;\n\t\t\t\t\timageSize.Height = signatureBounds.Height * scale.Height;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsignatureBounds = new NativeRect (0, 0, viewSize.Width, viewSize.Height);\n\t\t\t}\n\n\t\t\tstrokeWidth = settings.StrokeWidth.Value;\n\t\t\tstrokeColor = (NativeColor)settings.StrokeColor;\n\t\t\tbackgroundColor = (NativeColor)settings.BackgroundColor;\n\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic void LoadStrokes (NativePoint[][] loadedStrokes)\n\t\t{\n\t\t\t// clear any existing paths or points.\n\t\t\tClear ();\n\n\t\t\t// there is nothing\n\t\t\tif (loadedStrokes == null || loadedStrokes.Length == 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinkPresenter.AddStrokes (loadedStrokes, StrokeColor, (float)StrokeWidth);\n\n\t\t\tif (!IsBlank)\n\t\t\t{\n\t\t\t\tOnStrokeCompleted ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Allow the user to import an array of points to be used to draw a signature in the view, with new\n\t\t/// lines indicated by a { 0, 0 } point in the array.\n\t\t/// <param name=\"loadedPoints\"></param>\n\t\tpublic void LoadPoints (NativePoint[] loadedPoints)\n\t\t{\n\t\t\t// clear any existing paths or points.\n\t\t\tClear ();\n\n\t\t\t// there is nothing\n\t\t\tif (loadedPoints == null || loadedPoints.Length == 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar startIndex = 0;\n\n\t\t\tvar emptyIndex = Array.IndexOf (loadedPoints, new NativePoint (0, 0));\n\t\t\tif (emptyIndex == -1)\n\t\t\t{\n\t\t\t\temptyIndex = loadedPoints.Length;\n\t\t\t}\n\n\t\t\tvar strokes = new List<NativePoint[]> ();\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// add a stroke to the ink presenter\n\t\t\t\tvar currentStroke = new NativePoint[emptyIndex - startIndex];\n\t\t\t\tstrokes.Add (currentStroke);\n\t\t\t\tArray.Copy (loadedPoints, startIndex, currentStroke, 0, currentStroke.Length);\n\n\t\t\t\t// obtain the indices for the next line to be drawn.\n\t\t\t\tstartIndex = emptyIndex + 1;\n\t\t\t\tif (startIndex < loadedPoints.Length - 1)\n\t\t\t\t{\n\t\t\t\t\temptyIndex = Array.IndexOf (loadedPoints, new NativePoint (0, 0), startIndex);\n\t\t\t\t\tif (emptyIndex == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\temptyIndex = loadedPoints.Length;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\temptyIndex = startIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (startIndex < emptyIndex);\n\n\t\t\tinkPresenter.AddStrokes (strokes, StrokeColor, (float)StrokeWidth);\n\n\t\t\tif (!IsBlank)\n\t\t\t{\n\t\t\t\tOnStrokeCompleted ();\n\t\t\t}\n\t\t}\n\n\t\tprivate void OnCleared ()\n\t\t{\n\t\t\tCleared?.Invoke (this, EventArgs.Empty);\n\t\t}\n\n\t\tprivate void OnStrokeCompleted ()\n\t\t{\n\t\t\tOnStrokeCompleted (this, EventArgs.Empty);\n\t\t}\n\n\t\tprivate void OnStrokeCompleted (object sender, EventArgs e)\n\t\t{\n\t\t\tStrokeCompleted?.Invoke (this, e);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.Shared/SignaturePadView.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Threading.Tasks;\n\n#if __ANDROID__\nusing NativeRect = System.Drawing.RectangleF;\nusing NativePoint = System.Drawing.PointF;\nusing NativeSize = System.Drawing.SizeF;\nusing NativeColor = Android.Graphics.Color;\nusing NativeImage = Android.Graphics.Bitmap;\n#elif __IOS__\nusing NativeRect = CoreGraphics.CGRect;\nusing NativePoint = CoreGraphics.CGPoint;\nusing NativeSize = CoreGraphics.CGSize;\nusing NativeColor = UIKit.UIColor;\nusing NativeImage = UIKit.UIImage;\n#elif WINDOWS_UWP\nusing NativeRect = Windows.Foundation.Rect;\nusing NativePoint = Windows.Foundation.Point;\nusing NativeSize = Windows.Foundation.Size;\nusing NativeColor = Windows.UI.Color;\nusing NativeImage = Windows.UI.Xaml.Media.Imaging.WriteableBitmap;\n#endif\n\nnamespace Xamarin.Controls\n{\n#if WINDOWS_UWP\n\tpartial class SignaturePad\n#else\n\tpartial class SignaturePadView\n#endif\n\t{\n\t\tprivate const float DefaultWideSpacing = 12.0f;\n\t\tprivate const float DefaultNarrowSpacing = 3.0f;\n\t\tprivate const float DefaultLineThickness = 1.0f;\n\n\t\tprivate const float DefaultFontSize = 15.0f;\n\n\t\tprivate const string DefaultClearLabelText = \"clear\";\n\t\tprivate const string DefaultPromptText = \"▶\";\n\t\tprivate const string DefaultCaptionText = \"sign above the line\";\n\n#if __IOS__\n\t\tprivate static readonly NativeColor SignaturePadDarkColor = NativeColor.Black;\n\t\tprivate static readonly NativeColor SignaturePadLightColor = NativeColor.White;\n#elif __ANDROID__\n\t\tprivate static readonly NativeColor SignaturePadDarkColor = NativeColor.Black;\n\t\tprivate static readonly NativeColor SignaturePadLightColor = NativeColor.White;\n#elif WINDOWS_UWP\n\t\tprivate static readonly NativeColor SignaturePadDarkColor = Windows.UI.Colors.Black;\n\t\tprivate static readonly NativeColor SignaturePadLightColor = Windows.UI.Colors.White;\n#endif\n\n\t\tpublic NativePoint[][] Strokes => SignaturePadCanvas.Strokes;\n\n\t\tpublic NativePoint[] Points => SignaturePadCanvas.Points;\n\n\t\tpublic bool IsBlank => SignaturePadCanvas?.IsBlank ?? true;\n\n\t\tpublic event EventHandler StrokeCompleted;\n\n\t\tpublic event EventHandler Cleared;\n\n\t\tpublic void Clear ()\n\t\t{\n\t\t\tSignaturePadCanvas.Clear ();\n\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\tpublic void LoadPoints (NativePoint[] points)\n\t\t{\n\t\t\tSignaturePadCanvas.LoadPoints (points);\n\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\tpublic void LoadStrokes (NativePoint[][] strokes)\n\t\t{\n\t\t\tSignaturePadCanvas.LoadStrokes (strokes);\n\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified size.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified scale.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (strokeColor, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified size with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (strokeColor, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified scale with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (strokeColor, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeColor fillColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (strokeColor, fillColor, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified size with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeColor fillColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (strokeColor, fillColor, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature at the specified scale with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (NativeColor strokeColor, NativeColor fillColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (strokeColor, fillColor, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an image of the currently drawn signature using the specified settings.\n\t\t/// </summary>\n\t\tpublic NativeImage GetImage (ImageConstructionSettings settings)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImage (settings);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified size.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified scale.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified size with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified scale with the specified stroke color.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeColor fillColor, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, fillColor, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified size with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeColor fillColor, NativeSize size, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, fillColor, size, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature at the specified scale with the specified stroke and background colors.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, NativeColor strokeColor, NativeColor fillColor, float scale, bool shouldCrop = true, bool keepAspectRatio = true)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, strokeColor, fillColor, scale, shouldCrop, keepAspectRatio);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create an encoded image of the currently drawn signature using the specified settings.\n\t\t/// </summary>\n\t\tpublic Task<Stream> GetImageStreamAsync (SignatureImageFormat format, ImageConstructionSettings settings)\n\t\t{\n\t\t\treturn SignaturePadCanvas.GetImageStreamAsync (format, settings);\n\t\t}\n\n\t\tprivate void OnClearTapped ()\n\t\t{\n\t\t\tClear ();\n\t\t}\n\n\t\tprivate void OnSignatureCleared ()\n\t\t{\n\t\t\tUpdateUi ();\n\t\t\tCleared?.Invoke (this, EventArgs.Empty);\n\t\t}\n\n\t\tprivate void OnSignatureStrokeCompleted ()\n\t\t{\n\t\t\tUpdateUi ();\n\t\t\tStrokeCompleted?.Invoke (this, EventArgs.Empty);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.UWP/SignaturePad.UWP.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>uap10.0.10240</TargetFramework>\n    <RootNamespace>Xamarin.Controls</RootNamespace>\n    <AssemblyName>SignaturePad</AssemblyName>\n    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>\n    <DocumentationFile Condition=\" '$(Configuration)' == 'Release' \">bin\\$(Configuration)\\$(AssemblyName).xml</DocumentationFile>\n    <AssemblyVersion>1.0.0</AssemblyVersion>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <Version>1.0.0</Version>\n    <PackageId>Xamarin.Controls.SignaturePad</PackageId>\n    <Title>SignaturePad for Xamarin and Windows</Title>\n    <Product>$(AssemblyName) ($(TargetFramework))</Product>\n    <Authors>Microsoft</Authors>\n    <Owners>Microsoft</Owners>\n    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>\n    <Summary>Makes capturing, saving, and displaying signatures extremely simple.</Summary>\n    <Description>Makes capturing, saving, and displaying signatures extremely simple.</Description>\n    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>\n    <NeutralLanguage>en</NeutralLanguage>\n    <PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=874510</PackageIconUrl>\n    <RepositoryUrl>https://go.microsoft.com/fwlink/?linkid=874507</RepositoryUrl>\n    <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=874507</PackageProjectUrl>\n    <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</PackageLicenseUrl>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</PackageReleaseNotes>\n    <PackageTags>xamarin,signature,handwriting,windows,ios,android,uwp</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"MSBuild.Sdk.Extras\" Version=\"1.4.0\" PrivateAssets=\"All\" />\n    <PackageReference Include=\"Microsoft.NETCore.UniversalWindowsPlatform\" Version=\"6.0.8\" />\n    <PackageReference Include=\"Win2D.uwp\" Version=\"1.21.0\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <Compile Include=\"..\\SignaturePad.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n    <Page Include=\"Themes\\Generic.xaml\" Generator=\"MSBuild:Compile\" />\n  </ItemGroup>\n\n  <Import Project=\"$(MSBuildSDKExtrasTargets)\" Condition=\"Exists('$(MSBuildSDKExtrasTargets)')\" />\n\n</Project>"
  },
  {
    "path": "src/SignaturePad.UWP/SignaturePad.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing Windows.UI;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Controls;\nusing Windows.UI.Xaml.Media;\n\nnamespace Xamarin.Controls\n{\n\t[TemplatePart (Name = PartBackgroundImageView, Type = typeof (Image))]\n\t[TemplatePart (Name = PartSignaturePadCanvas, Type = typeof (SignaturePadCanvasView))]\n\t[TemplatePart (Name = PartCaption, Type = typeof (TextBlock))]\n\t[TemplatePart (Name = PartSignatureLine, Type = typeof (Border))]\n\t[TemplatePart (Name = PartSignaturePrompt, Type = typeof (TextBlock))]\n\t[TemplatePart (Name = PartClearLabel, Type = typeof (TextBlock))]\n\tpublic partial class SignaturePad : Control\n\t{\n\t\tprivate const string PartBackgroundImageView = \"BackgroundImageView\";\n\t\tprivate const string PartSignaturePadCanvas = \"SignaturePadCanvas\";\n\t\tprivate const string PartCaption = \"Caption\";\n\t\tprivate const string PartSignatureLine = \"SignatureLine\";\n\t\tprivate const string PartSignaturePrompt = \"SignaturePrompt\";\n\t\tprivate const string PartClearLabel = \"ClearLabel\";\n\n\t\tpublic static readonly DependencyProperty StrokeColorProperty;\n\t\tpublic static readonly DependencyProperty StrokeWidthProperty;\n\t\tpublic static readonly DependencyProperty SignatureLineBrushProperty;\n\t\tpublic static readonly DependencyProperty SignatureLineThicknessProperty;\n\t\tpublic static readonly DependencyProperty SignatureLineSpacingProperty;\n\t\tpublic static readonly DependencyProperty CaptionTextProperty;\n\t\tpublic static readonly DependencyProperty CaptionFontSizeProperty;\n\t\tpublic static readonly DependencyProperty CaptionForegroundProperty;\n\t\tpublic static readonly DependencyProperty SignaturePromptTextProperty;\n\t\tpublic static readonly DependencyProperty SignaturePromptFontSizeProperty;\n\t\tpublic static readonly DependencyProperty SignaturePromptForegroundProperty;\n\t\tpublic static readonly DependencyProperty ClearLabelTextProperty;\n\t\tpublic static readonly DependencyProperty ClearLabelFontSizeProperty;\n\t\tpublic static readonly DependencyProperty ClearLabelForegroundProperty;\n\t\tpublic static readonly DependencyProperty BackgroundImageProperty;\n\t\tpublic static readonly DependencyProperty BackgroundImageStretchProperty;\n\t\tpublic static readonly DependencyProperty BackgroundImageOpacityProperty;\n\n\t\tstatic SignaturePad ()\n\t\t{\n\t\t\tStrokeColorProperty = DependencyProperty.Register (\n\t\t\t\tnameof (StrokeColor),\n\t\t\t\ttypeof (Color),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (ImageConstructionSettings.DefaultStrokeColor));\n\n\t\t\tStrokeWidthProperty = DependencyProperty.Register (\n\t\t\t\tnameof (StrokeWidth),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata ((double)ImageConstructionSettings.DefaultStrokeWidth));\n\n\t\t\tSignatureLineBrushProperty = DependencyProperty.Register (\n\t\t\t\tnameof (SignatureLineBrush),\n\t\t\t\ttypeof (Brush),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (new SolidColorBrush (SignaturePadDarkColor)));\n\n\t\t\tSignatureLineThicknessProperty = DependencyProperty.Register (\n\t\t\t\tnameof (SignatureLineThickness),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata ((double)DefaultLineThickness));\n\n\t\t\tSignatureLineSpacingProperty = DependencyProperty.Register (\n\t\t\t\tnameof (SignatureLineSpacing),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata ((double)DefaultNarrowSpacing, OnPaddingChanged));\n\n\t\t\tCaptionTextProperty = DependencyProperty.Register (\n\t\t\t\tnameof (CaptionText),\n\t\t\t\ttypeof (string),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (DefaultCaptionText));\n\n\t\t\tCaptionFontSizeProperty = DependencyProperty.Register (\n\t\t\t\tnameof (CaptionFontSize),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata ((double)DefaultFontSize));\n\n\t\t\tCaptionForegroundProperty = DependencyProperty.Register (\n\t\t\t\tnameof (CaptionForeground),\n\t\t\t\ttypeof (Brush),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (new SolidColorBrush (SignaturePadDarkColor)));\n\n\t\t\tSignaturePromptTextProperty = DependencyProperty.Register (\n\t\t\t\tnameof (SignaturePromptText),\n\t\t\t\ttypeof (string),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (DefaultPromptText));\n\n\t\t\tSignaturePromptFontSizeProperty = DependencyProperty.Register (\n\t\t\t\tnameof (SignaturePromptFontSize),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata ((double)DefaultFontSize));\n\n\t\t\tSignaturePromptForegroundProperty = DependencyProperty.Register (\n\t\t\t\tnameof (SignaturePromptForeground),\n\t\t\t\ttypeof (Brush),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (new SolidColorBrush (SignaturePadDarkColor)));\n\n\t\t\tClearLabelTextProperty = DependencyProperty.Register (\n\t\t\t\tnameof (ClearLabelText),\n\t\t\t\ttypeof (string),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (DefaultClearLabelText));\n\n\t\t\tClearLabelFontSizeProperty = DependencyProperty.Register (\n\t\t\t\tnameof (ClearLabelFontSize),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata ((double)DefaultFontSize));\n\n\t\t\tClearLabelForegroundProperty = DependencyProperty.Register (\n\t\t\t\tnameof (ClearLabelForeground),\n\t\t\t\ttypeof (Brush),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (new SolidColorBrush (SignaturePadDarkColor)));\n\n\t\t\tBackgroundImageProperty = DependencyProperty.Register (\n\t\t\t\tnameof (BackgroundImage),\n\t\t\t\ttypeof (ImageSource),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (null));\n\n\t\t\tBackgroundImageStretchProperty = DependencyProperty.Register (\n\t\t\t\tnameof (BackgroundImageStretch),\n\t\t\t\ttypeof (Stretch),\n\t\t\t\ttypeof (SignaturePad), new PropertyMetadata (Stretch.None));\n\n\t\t\tBackgroundImageOpacityProperty = DependencyProperty.Register (\n\t\t\t\tnameof (BackgroundImageOpacity),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePad),\n\t\t\t\tnew PropertyMetadata (1.0));\n\t\t}\n\n\t\tpublic SignaturePad ()\n\t\t{\n\t\t\tDefaultStyleKey = typeof (SignaturePad);\n\n\t\t\tRegisterPropertyChangedCallback (PaddingProperty, OnPaddingChanged);\n\n\t\t\tPadding = new Thickness (DefaultWideSpacing, DefaultWideSpacing, DefaultWideSpacing, DefaultNarrowSpacing);\n\t\t}\n\n\t\tprotected override void OnApplyTemplate ()\n\t\t{\n\t\t\tSignaturePadCanvas.StrokeCompleted += delegate\n\t\t\t{\n\t\t\t\tOnSignatureStrokeCompleted ();\n\t\t\t};\n\t\t\tSignaturePadCanvas.Cleared += delegate\n\t\t\t{\n\t\t\t\tOnSignatureCleared ();\n\t\t\t};\n\t\t\tClearLabel.Tapped += delegate\n\t\t\t{\n\t\t\t\tOnClearTapped ();\n\t\t\t};\n\n\t\t\tOnPaddingChanged (this, PaddingProperty);\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\t/// <summary>\n\t\t/// The real signature canvas view\n\t\t/// </summary>\n\t\tpublic SignaturePadCanvasView SignaturePadCanvas => GetTemplateChild (PartSignaturePadCanvas) as SignaturePadCanvasView;\n\n\t\t/// <summary>\n\t\t/// The prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\tpublic TextBlock SignaturePrompt => GetTemplateChild (PartSignaturePrompt) as TextBlock;\n\n\t\t/// <summary>\n\t\t/// The caption displayed under the signature line.\n\t\t/// </summary>\n\t\tpublic TextBlock Caption => GetTemplateChild (PartCaption) as TextBlock;\n\n\t\t/// <summary>\n\t\t/// An image view that may be used as a watermark or as a texture for the signature pad.\n\t\t/// </summary>\n\t\tpublic Image BackgroundImageView => GetTemplateChild (PartBackgroundImageView) as Image;\n\n\t\t/// <summary>\n\t\t/// Gets the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\tpublic TextBlock ClearLabel => GetTemplateChild (PartClearLabel) as TextBlock;\n\n\t\t/// <summary>\n\t\t/// Gets the horizontal line that goes in the lower part of the pad.\n\t\t/// </summary>\n\t\tpublic Border SignatureLine => GetTemplateChild (PartSignatureLine) as Border;\n\n\t\tpublic Color StrokeColor\n\t\t{\n\t\t\tget { return (Color)GetValue (StrokeColorProperty); }\n\t\t\tset { SetValue (StrokeColorProperty, value); }\n\t\t}\n\n\t\tpublic double StrokeWidth\n\t\t{\n\t\t\tget { return (double)GetValue (StrokeWidthProperty); }\n\t\t\tset { SetValue (StrokeWidthProperty, value); }\n\t\t}\n\n\t\tpublic Brush SignatureLineBrush\n\t\t{\n\t\t\tget { return (Brush)GetValue (SignatureLineBrushProperty); }\n\t\t\tset { SetValue (SignatureLineBrushProperty, value); }\n\t\t}\n\n\t\tpublic Thickness SignatureLineThickness\n\t\t{\n\t\t\tget { return (Thickness)GetValue (SignatureLineThicknessProperty); }\n\t\t\tset { SetValue (SignatureLineThicknessProperty, value); }\n\t\t}\n\n\t\tpublic double SignatureLineSpacing\n\t\t{\n\t\t\tget { return (double)GetValue (SignatureLineSpacingProperty); }\n\t\t\tset { SetValue (SignatureLineSpacingProperty, value); }\n\t\t}\n\n\t\tpublic string CaptionText\n\t\t{\n\t\t\tget { return (string)GetValue (CaptionTextProperty); }\n\t\t\tset { SetValue (CaptionTextProperty, value); }\n\t\t}\n\n\t\tpublic double CaptionFontSize\n\t\t{\n\t\t\tget { return (double)GetValue (CaptionFontSizeProperty); }\n\t\t\tset { SetValue (CaptionFontSizeProperty, value); }\n\t\t}\n\n\t\tpublic Brush CaptionForeground\n\t\t{\n\t\t\tget { return (Brush)GetValue (CaptionForegroundProperty); }\n\t\t\tset { SetValue (CaptionForegroundProperty, value); }\n\t\t}\n\n\t\tpublic string SignaturePromptText\n\t\t{\n\t\t\tget { return (string)GetValue (SignaturePromptTextProperty); }\n\t\t\tset { SetValue (SignaturePromptTextProperty, value); }\n\t\t}\n\n\t\tpublic double SignaturePromptFontSize\n\t\t{\n\t\t\tget { return (double)GetValue (SignaturePromptFontSizeProperty); }\n\t\t\tset { SetValue (SignaturePromptFontSizeProperty, value); }\n\t\t}\n\n\t\tpublic Brush SignaturePromptForeground\n\t\t{\n\t\t\tget { return (Brush)GetValue (SignaturePromptForegroundProperty); }\n\t\t\tset { SetValue (SignaturePromptForegroundProperty, value); }\n\t\t}\n\n\t\tpublic string ClearLabelText\n\t\t{\n\t\t\tget { return (string)GetValue (ClearLabelTextProperty); }\n\t\t\tset { SetValue (ClearLabelTextProperty, value); }\n\t\t}\n\n\t\tpublic double ClearLabelFontSize\n\t\t{\n\t\t\tget { return (double)GetValue (ClearLabelFontSizeProperty); }\n\t\t\tset { SetValue (ClearLabelFontSizeProperty, value); }\n\t\t}\n\n\t\tpublic Brush ClearLabelForeground\n\t\t{\n\t\t\tget { return (Brush)GetValue (ClearLabelForegroundProperty); }\n\t\t\tset { SetValue (ClearLabelForegroundProperty, value); }\n\t\t}\n\n\t\tpublic ImageSource BackgroundImage\n\t\t{\n\t\t\tget { return (ImageSource)GetValue (BackgroundImageProperty); }\n\t\t\tset { SetValue (BackgroundImageProperty, value); }\n\t\t}\n\n\t\tpublic Stretch BackgroundImageStretch\n\t\t{\n\t\t\tget { return (Stretch)GetValue (BackgroundImageStretchProperty); }\n\t\t\tset { SetValue (BackgroundImageStretchProperty, value); }\n\t\t}\n\n\t\tpublic double BackgroundImageOpacity\n\t\t{\n\t\t\tget { return (double)GetValue (BackgroundImageOpacityProperty); }\n\t\t\tset { SetValue (BackgroundImageOpacityProperty, value); }\n\t\t}\n\n\t\t[EditorBrowsable (EditorBrowsableState.Never)]\n\t\t[Obsolete (\"Use Background instead.\")]\n\t\tpublic Color BackgroundColor\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tvar scb = Background as SolidColorBrush;\n\t\t\t\treturn scb == null ? Colors.Transparent : scb.Color;\n\t\t\t}\n\t\t\tset { Background = new SolidColorBrush (value); }\n\t\t}\n\n\t\t[EditorBrowsable (EditorBrowsableState.Never)]\n\t\t[Obsolete (\"Use SignatureLineBrush instead.\")]\n\t\tpublic Color SignatureLineColor\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tvar scb = SignatureLineBrush as SolidColorBrush;\n\t\t\t\treturn scb == null ? Colors.Transparent : scb.Color;\n\t\t\t}\n\t\t\tset { SignatureLineBrush = new SolidColorBrush (value); }\n\t\t}\n\n\t\tprivate void UpdateUi ()\n\t\t{\n\t\t\tClearLabel.Visibility = IsBlank ? Visibility.Collapsed : Visibility.Visible;\n\t\t}\n\n\t\tprivate void OnPaddingChanged (DependencyObject sender, DependencyProperty dp)\n\t\t{\n\t\t\tvar padding = Padding;\n\t\t\tvar spacing = SignatureLineSpacing;\n\n\t\t\tif (SignatureLine != null)\n\t\t\t{\n\t\t\t\tSignatureLine.Margin = new Thickness (padding.Left, 0, padding.Right, 0);\n\t\t\t}\n\t\t\tif (Caption != null)\n\t\t\t{\n\t\t\t\tCaption.Margin = new Thickness (0, spacing, 0, padding.Bottom);\n\t\t\t}\n\t\t\tif (ClearLabel != null)\n\t\t\t{\n\t\t\t\tClearLabel.Margin = new Thickness (0, padding.Top, padding.Right, 0);\n\t\t\t}\n\t\t\tif (SignaturePrompt != null)\n\t\t\t{\n\t\t\t\tSignaturePrompt.Margin = new Thickness (padding.Left, 0, 0, spacing);\n\t\t\t}\n\t\t}\n\n\t\tprivate static void OnPaddingChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)\n\t\t{\n\t\t\t((SignaturePad)d).OnPaddingChanged (d, e.Property);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.UWP/SignaturePadCanvasView.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Linq;\nusing System.Numerics;\nusing System.Runtime.InteropServices.WindowsRuntime;\nusing System.Threading.Tasks;\nusing Windows.Foundation;\nusing Windows.Storage.Streams;\nusing Windows.UI;\nusing Windows.UI.Core;\nusing Windows.UI.Input.Inking;\nusing Windows.UI.Xaml;\nusing Windows.UI.Xaml.Controls;\nusing Windows.UI.Xaml.Media.Imaging;\nusing Microsoft.Graphics.Canvas;\n\nnamespace Xamarin.Controls\n{\n\t[TemplatePart (Name = PartInkCanvas, Type = typeof (InkCanvas))]\n\tpublic partial class SignaturePadCanvasView : Control\n\t{\n\t\tpublic static readonly DependencyProperty StrokeColorProperty;\n\t\tpublic static readonly DependencyProperty StrokeWidthProperty;\n\n\t\tprivate const string PartInkCanvas = \"InkCanvas\";\n\n\t\tprivate InkPresenter inkPresenter;\n\n\t\tstatic SignaturePadCanvasView ()\n\t\t{\n\t\t\tStrokeColorProperty = DependencyProperty.Register (\n\t\t\t\tnameof (StrokeColor),\n\t\t\t\ttypeof (Color),\n\t\t\t\ttypeof (SignaturePadCanvasView),\n\t\t\t\tnew PropertyMetadata (ImageConstructionSettings.DefaultStrokeColor, OnStrokePropertiesChanged));\n\n\t\t\tStrokeWidthProperty = DependencyProperty.Register (\n\t\t\t\tnameof (StrokeWidth),\n\t\t\t\ttypeof (double),\n\t\t\t\ttypeof (SignaturePadCanvasView),\n\t\t\t\tnew PropertyMetadata ((double)ImageConstructionSettings.DefaultStrokeWidth, OnStrokePropertiesChanged));\n\t\t}\n\n\t\tpublic SignaturePadCanvasView ()\n\t\t{\n\t\t\tDefaultStyleKey = typeof (SignaturePadCanvasView);\n\n\t\t\tIsEnabledChanged += delegate\n\t\t\t{\n\t\t\t\tvar ip = inkPresenter;\n\t\t\t\tif (ip != null)\n\t\t\t\t\tip.IsInputEnabled = IsEnabled;\n\t\t\t};\n\t\t}\n\n\t\tprotected override void OnApplyTemplate ()\n\t\t{\n\t\t\tinkPresenter = InkCanvas?.InkPresenter;\n\t\t\tinkPresenter.StrokesCollected += (sender, e) => OnStrokeCompleted ();\n\t\t\tinkPresenter.InputDeviceTypes = CoreInputDeviceTypes.Touch | CoreInputDeviceTypes.Pen | CoreInputDeviceTypes.Mouse;\n\n\t\t\tOnStrokePropertiesChanged (this, null);\n\t\t}\n\n\t\tprivate InkCanvas InkCanvas => GetTemplateChild (PartInkCanvas) as InkCanvas;\n\n\t\tpublic Color StrokeColor\n\t\t{\n\t\t\tget { return (Color)GetValue (StrokeColorProperty); }\n\t\t\tset { SetValue (StrokeColorProperty, value); }\n\t\t}\n\n\t\tpublic double StrokeWidth\n\t\t{\n\t\t\tget { return (double)GetValue (StrokeWidthProperty); }\n\t\t\tset { SetValue (StrokeWidthProperty, value); }\n\t\t}\n\n\t\tpublic void Clear ()\n\t\t{\n\t\t\tif (inkPresenter != null)\n\t\t\t{\n\t\t\t\tinkPresenter.StrokeContainer.Clear ();\n\n\t\t\t\tOnCleared ();\n\t\t\t}\n\t\t}\n\n\t\tprivate async Task<Stream> GetImageStreamInternal (SignatureImageFormat format, Size scale, Rect signatureBounds, Size imageSize, float strokeWidth, Color strokeColor, Color backgroundColor)\n\t\t{\n\t\t\tCanvasBitmapFileFormat cbff;\n\t\t\tif (format == SignatureImageFormat.Jpeg)\n\t\t\t{\n\t\t\t\tcbff = CanvasBitmapFileFormat.Jpeg;\n\t\t\t}\n\t\t\telse if (format == SignatureImageFormat.Png)\n\t\t\t{\n\t\t\t\tcbff = CanvasBitmapFileFormat.Png;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tusing (var offscreen = GetRenderTarget (scale, signatureBounds, imageSize, strokeWidth, strokeColor, backgroundColor))\n\t\t\t{\n\t\t\t\tvar fileStream = new InMemoryRandomAccessStream ();\n\t\t\t\tawait offscreen.SaveAsync (fileStream, cbff);\n\n\t\t\t\tvar stream = fileStream.AsStream ();\n\t\t\t\tstream.Position = 0;\n\n\t\t\t\treturn stream;\n\t\t\t}\n\t\t}\n\n\t\tprivate WriteableBitmap GetImageInternal (Size scale, Rect signatureBounds, Size imageSize, float strokeWidth, Color strokeColor, Color backgroundColor)\n\t\t{\n\t\t\tusing (var offscreen = GetRenderTarget (scale, signatureBounds, imageSize, strokeWidth, strokeColor, backgroundColor))\n\t\t\t{\n\t\t\t\tvar bitmap = new WriteableBitmap ((int)offscreen.SizeInPixels.Width, (int)offscreen.SizeInPixels.Height);\n\t\t\t\toffscreen.GetPixelBytes (bitmap.PixelBuffer);\n\t\t\t\treturn bitmap;\n\t\t\t}\n\t\t}\n\n\t\tprivate CanvasRenderTarget GetRenderTarget (Size scale, Rect signatureBounds, Size imageSize, float strokeWidth, Color strokeColor, Color backgroundColor)\n\t\t{\n\t\t\tvar device = CanvasDevice.GetSharedDevice ();\n\t\t\tvar offscreen = new CanvasRenderTarget (device, (int)imageSize.Width, (int)imageSize.Height, 96);\n\n\t\t\tusing (var session = offscreen.CreateDrawingSession ())\n\t\t\t{\n\t\t\t\tsession.Clear (backgroundColor);\n\n\t\t\t\tsession.Transform = Matrix3x2.Multiply (\n\t\t\t\t\tMatrix3x2.CreateTranslation ((float)-signatureBounds.X, (float)-signatureBounds.Y),\n\t\t\t\t\tMatrix3x2.CreateScale ((float)scale.Width, (float)scale.Height));\n\n\t\t\t\t// apply the specified colors/style\n\t\t\t\tvar strokes = inkPresenter.StrokeContainer.GetStrokes ().Select (s =>\n\t\t\t\t{\n\t\t\t\t\t// clone first, since this will change the UI if we don't\n\t\t\t\t\ts = s.Clone ();\n\t\t\t\t\tvar attr = s.DrawingAttributes;\n\t\t\t\t\tattr.Color = strokeColor;\n\t\t\t\t\tattr.Size = new Size (StrokeWidth, StrokeWidth);\n\t\t\t\t\ts.DrawingAttributes = attr;\n\t\t\t\t\treturn s;\n\t\t\t\t});\n\n\t\t\t\tsession.DrawInk (strokes.ToArray ());\n\t\t\t}\n\n\t\t\treturn offscreen;\n\t\t}\n\n\t\tprivate static void OnStrokePropertiesChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)\n\t\t{\n\t\t\tvar signaturePad = d as SignaturePadCanvasView;\n\n\t\t\tvar inkPresenter = signaturePad.inkPresenter;\n\t\t\tif (inkPresenter != null)\n\t\t\t{\n\t\t\t\tvar da = inkPresenter.CopyDefaultDrawingAttributes ();\n\t\t\t\tda.Color = signaturePad.StrokeColor;\n\t\t\t\tda.Size = new Size (signaturePad.StrokeWidth, signaturePad.StrokeWidth);\n\n\t\t\t\tinkPresenter.UpdateDefaultDrawingAttributes (da);\n\n\t\t\t\tforeach (var stroke in inkPresenter.StrokeContainer.GetStrokes ())\n\t\t\t\t{\n\t\t\t\t\tstroke.DrawingAttributes = da;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.UWP/Themes/Generic.xaml",
    "content": "<ResourceDictionary\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n    xmlns:local=\"using:Xamarin.Controls\">\n\n    <Style TargetType=\"local:SignaturePad\">\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\n        <Setter Property=\"Template\">\n            <Setter.Value>\n                <ControlTemplate TargetType=\"local:SignaturePad\">\n                    <Border\n                        BorderThickness=\"{TemplateBinding BorderThickness}\"\n                        BorderBrush=\"{TemplateBinding BorderBrush}\"\n                        Background=\"{TemplateBinding Background}\">\n                        <Grid>\n                            <Grid.RowDefinitions>\n                                <RowDefinition Height=\"*\" />\n                                <RowDefinition Height=\"Auto\" />\n                            </Grid.RowDefinitions>\n\n                            <Image\n                                Name=\"BackgroundImageView\"\n                                Source=\"{TemplateBinding BackgroundImage}\"\n                                Stretch=\"{TemplateBinding BackgroundImageStretch}\"\n                                Opacity=\"{TemplateBinding BackgroundImageOpacity}\"\n                                HorizontalAlignment=\"Stretch\"\n                                VerticalAlignment=\"Stretch\"\n                                Grid.RowSpan=\"2\" />\n\n                            <local:SignaturePadCanvasView\n                                Name=\"SignaturePadCanvas\"\n                                HorizontalAlignment=\"Stretch\"\n                                VerticalAlignment=\"Stretch\"\n                                StrokeColor=\"{TemplateBinding StrokeColor}\"\n                                StrokeWidth=\"{TemplateBinding StrokeWidth}\"\n                                Grid.RowSpan=\"2\" />\n\n                            <TextBlock\n                                Name=\"SignaturePrompt\"\n                                Text=\"{TemplateBinding SignaturePromptText}\"\n                                FontSize=\"{TemplateBinding SignaturePromptFontSize}\"\n                                Foreground=\"{TemplateBinding SignaturePromptForeground}\"\n                                IsHitTestVisible=\"False\"\n                                FontWeight=\"Bold\"\n                                HorizontalAlignment=\"Stretch\"\n                                VerticalAlignment=\"Bottom\" />\n\n                            <TextBlock\n                                Name=\"ClearLabel\"\n                                Text=\"{TemplateBinding ClearLabelText}\"\n                                FontSize=\"{TemplateBinding ClearLabelFontSize}\"\n                                Foreground=\"{TemplateBinding ClearLabelForeground}\"\n                                FontWeight=\"Bold\"\n                                Visibility=\"Collapsed\"\n                                HorizontalAlignment=\"Right\"\n                                VerticalAlignment=\"Top\" />\n\n                            <TextBlock\n                                Name=\"Caption\"\n                                Text=\"{TemplateBinding CaptionText}\"\n                                FontSize=\"{TemplateBinding CaptionFontSize}\"\n                                Foreground=\"{TemplateBinding CaptionForeground}\"\n                                IsHitTestVisible=\"False\"\n                                TextAlignment=\"Center\"\n                                HorizontalAlignment=\"Stretch\"\n                                VerticalAlignment=\"Bottom\"\n                                Grid.Row=\"1\" />\n\n                            <Border\n                                Name=\"SignatureLine\"\n                                Background=\"{TemplateBinding SignatureLineBrush}\"\n                                IsHitTestVisible=\"False\"\n                                HorizontalAlignment=\"Stretch\"\n                                VerticalAlignment=\"Bottom\"\n                                Height=\"{TemplateBinding SignatureLineThickness}\" />\n\n                        </Grid>\n                    </Border>\n                </ControlTemplate>\n            </Setter.Value>\n        </Setter>\n    </Style>\n\n    <Style TargetType=\"local:SignaturePadCanvasView\">\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\n        <Setter Property=\"Template\">\n            <Setter.Value>\n                <ControlTemplate TargetType=\"local:SignaturePadCanvasView\">\n                    <Border\n                        Background=\"{TemplateBinding Background}\"\n                        BorderBrush=\"{TemplateBinding BorderBrush}\"\n                        BorderThickness=\"{TemplateBinding BorderThickness}\">\n                        <InkCanvas Name=\"InkCanvas\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" />\n                    </Border>\n                </ControlTemplate>\n            </Setter.Value>\n        </Setter>\n    </Style>\n\n</ResourceDictionary>\n"
  },
  {
    "path": "src/SignaturePad.iOS/InkPresenter.cs",
    "content": "﻿using System.Collections.Generic;\nusing CoreGraphics;\nusing Foundation;\nusing UIKit;\n\nnamespace Xamarin.Controls\n{\n\tpartial class InkPresenter : UIView\n\t{\n\t\tstatic InkPresenter ()\n\t\t{\n\t\t\tScreenDensity = (float)UIScreen.MainScreen.Scale;\n\t\t}\n\n\t\tpublic InkPresenter ()\n\t\t\t: base ()\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tpublic InkPresenter (CGRect frame)\n\t\t\t: base (frame)\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tprivate void Initialize ()\n\t\t{\n\t\t\tOpaque = false;\n\t\t}\n\n\t\t// If you put SignaturePad inside a ScrollView, this line of code prevent that the gesture inside \n\t\t// an InkPresenter are dispatched to the ScrollView below\n\t\tpublic override bool GestureRecognizerShouldBegin (UIGestureRecognizer gestureRecognizer) => false;\n\n\t\tpublic override void TouchesBegan (NSSet touches, UIEvent evt)\n\t\t{\n\t\t\t// create a new path and set the options\n\t\t\tcurrentPath = new InkStroke (UIBezierPath.Create (), new List<CGPoint> (), StrokeColor, StrokeWidth);\n\n\t\t\t// obtain the location of the touch\n\t\t\tvar touch = touches.AnyObject as UITouch;\n\t\t\tvar touchLocation = touch.LocationInView (this);\n\n\t\t\t// move the path to that position\n\t\t\tcurrentPath.Path.MoveTo (touchLocation);\n\t\t\tcurrentPath.GetPoints ().Add (touchLocation);\n\n\t\t\t// update the dirty rectangle\n\t\t\tResetBounds (touchLocation);\n\t\t}\n\n\t\tpublic override void TouchesMoved (NSSet touches, UIEvent evt)\n\t\t{\n\t\t\t// something may have happened (clear) so start the stroke again\n\t\t\tif (currentPath == null)\n\t\t\t{\n\t\t\t\tTouchesBegan (touches, evt);\n\t\t\t}\n\n\t\t\t// obtain the location of the touch\n\t\t\tvar touch = touches.AnyObject as UITouch;\n\t\t\tvar touchLocation = touch.LocationInView (this);\n\n\t\t\tif (HasMovedFarEnough (currentPath, touchLocation.X, touchLocation.Y))\n\t\t\t{\n\t\t\t\t// add it to the current path\n\t\t\t\tcurrentPath.Path.AddLineTo (touchLocation);\n\t\t\t\tcurrentPath.GetPoints ().Add (touchLocation);\n\n\t\t\t\t// update the dirty rectangle\n\t\t\t\tUpdateBounds (touchLocation);\n\t\t\t\tSetNeedsDisplayInRect (DirtyRect);\n\t\t\t}\n\t\t}\n\n\t\tpublic override void TouchesCancelled (NSSet touches, UIEvent evt)\n\t\t{\n\t\t\tTouchesEnded (touches, evt);\n\t\t}\n\n\t\tpublic override void TouchesEnded (NSSet touches, UIEvent evt)\n\t\t{\n\t\t\t// obtain the location of the touch\n\t\t\tvar touch = touches.AnyObject as UITouch;\n\t\t\tvar touchLocation = touch.LocationInView (this);\n\n\t\t\t// something may have happened (clear) during the stroke\n\t\t\tif (currentPath != null)\n\t\t\t{\n\t\t\t\tif (HasMovedFarEnough (currentPath, touchLocation.X, touchLocation.Y))\n\t\t\t\t{\n\t\t\t\t\t// add it to the current path\n\t\t\t\t\tcurrentPath.Path.AddLineTo (touchLocation);\n\t\t\t\t\tcurrentPath.GetPoints ().Add (touchLocation);\n\t\t\t\t}\n\n\t\t\t\t// obtain the smoothed path, and add it to the old paths\n\t\t\t\tvar smoothed = PathSmoothing.SmoothedPathWithGranularity (currentPath, 4);\n\t\t\t\tpaths.Add (smoothed);\n\t\t\t}\n\n\t\t\t// clear the current path\n\t\t\tcurrentPath = null;\n\n\t\t\t// update the dirty rectangle\n\t\t\tUpdateBounds (touchLocation);\n\t\t\tSetNeedsDisplay ();\n\n\t\t\t// we are done with drawing\n\t\t\tOnStrokeCompleted ();\n\t\t}\n\n\t\tpublic override void Draw (CGRect rect)\n\t\t{\n\t\t\tbase.Draw (rect);\n\n\t\t\t// destroy an old bitmap\n\t\t\tif (bitmapBuffer != null && ShouldRedrawBufferImage)\n\t\t\t{\n\t\t\t\tvar temp = bitmapBuffer;\n\t\t\t\tbitmapBuffer = null;\n\n\t\t\t\ttemp.Dispose ();\n\t\t\t\ttemp = null;\n\t\t\t}\n\n\t\t\t// re-create\n\t\t\tif (bitmapBuffer == null)\n\t\t\t{\n\t\t\t\tbitmapBuffer = CreateBufferImage ();\n\t\t\t}\n\n\t\t\t// if there are no lines, the the bitmap will be null\n\t\t\tif (bitmapBuffer != null)\n\t\t\t{\n\t\t\t\tbitmapBuffer.Draw (CGPoint.Empty);\n\t\t\t}\n\n\t\t\t// draw the current path over the old paths\n\t\t\tif (currentPath != null)\n\t\t\t{\n\t\t\t\tvar context = UIGraphics.GetCurrentContext ();\n\t\t\t\tcontext.SetLineCap (CGLineCap.Round);\n\t\t\t\tcontext.SetLineJoin (CGLineJoin.Round);\n\t\t\t\tcontext.SetStrokeColor (currentPath.Color.CGColor);\n\t\t\t\tcontext.SetLineWidth (currentPath.Width);\n\n\t\t\t\tcontext.AddPath (currentPath.Path.CGPath);\n\t\t\t\tcontext.StrokePath ();\n\t\t\t}\n\t\t}\n\n\t\tprivate UIImage CreateBufferImage ()\n\t\t{\n\t\t\tif (paths == null || paths.Count == 0)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar size = Bounds.Size;\n\t\t\tUIGraphics.BeginImageContextWithOptions (size, false, ScreenDensity);\n\t\t\tvar context = UIGraphics.GetCurrentContext ();\n\n\t\t\tcontext.SetLineCap (CGLineCap.Round);\n\t\t\tcontext.SetLineJoin (CGLineJoin.Round);\n\n\t\t\tforeach (var path in paths)\n\t\t\t{\n\t\t\t\tcontext.SetStrokeColor (path.Color.CGColor);\n\t\t\t\tcontext.SetLineWidth (path.Width);\n\n\t\t\t\tcontext.AddPath (path.Path.CGPath);\n\t\t\t\tcontext.StrokePath ();\n\n\t\t\t\tpath.IsDirty = false;\n\t\t\t}\n\n\t\t\tvar image = UIGraphics.GetImageFromCurrentImageContext ();\n\n\t\t\tUIGraphics.EndImageContext ();\n\n\t\t\treturn image;\n\t\t}\n\n\t\tpublic override void LayoutSubviews ()\n\t\t{\n\t\t\tbase.LayoutSubviews ();\n\n\t\t\tSetNeedsDisplay ();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.iOS/SignaturePad.iOS.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <TargetFramework>xamarin.ios1.0</TargetFramework>\n    <RootNamespace>Xamarin.Controls</RootNamespace>\n    <AssemblyName>SignaturePad</AssemblyName>\n    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>\n    <MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);VSX1000</MSBuildWarningsAsMessages>\n    <DocumentationFile Condition=\" '$(Configuration)' == 'Release' \">bin\\$(Configuration)\\$(AssemblyName).xml</DocumentationFile>\n    <AssemblyVersion>1.0.0</AssemblyVersion>\n  </PropertyGroup>\n\n  <PropertyGroup>\n    <Version>1.0.0</Version>\n    <PackageId>Xamarin.Controls.SignaturePad</PackageId>\n    <Title>SignaturePad for Xamarin and Windows</Title>\n    <Product>$(AssemblyName) ($(TargetFramework))</Product>\n    <Authors>Microsoft</Authors>\n    <Owners>Microsoft</Owners>\n    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>\n    <Summary>Makes capturing, saving, and displaying signatures extremely simple.</Summary>\n    <Description>Makes capturing, saving, and displaying signatures extremely simple.</Description>\n    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>\n    <NeutralLanguage>en</NeutralLanguage>\n    <PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=874510</PackageIconUrl>\n    <RepositoryUrl>https://go.microsoft.com/fwlink/?linkid=874507</RepositoryUrl>\n    <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=874507</PackageProjectUrl>\n    <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=874508</PackageLicenseUrl>\n    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?linkid=874509</PackageReleaseNotes>\n    <PackageTags>xamarin,signature,handwriting,windows,ios,android,uwp</PackageTags>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"MSBuild.Sdk.Extras\" Version=\"1.4.0\" PrivateAssets=\"All\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <Compile Include=\"..\\SignaturePad.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n    <Compile Include=\"..\\SignaturePad.InkPresenter.Shared\\**\\*.cs\" Link=\"%(filename).shared%(Extension)\" />\n  </ItemGroup>\n\n  <Import Project=\"$(MSBuildSDKExtrasTargets)\" Condition=\"Exists('$(MSBuildSDKExtrasTargets)')\" />\n\n</Project>"
  },
  {
    "path": "src/SignaturePad.iOS/SignaturePadCanvasView.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.IO;\nusing System.Threading.Tasks;\nusing CoreGraphics;\nusing Foundation;\nusing UIKit;\n\nnamespace Xamarin.Controls\n{\n\t[Register (\"SignaturePadCanvasView\")]\n\t[DesignTimeVisible (true)]\n\tpublic partial class SignaturePadCanvasView : UIView\n\t{\n\t\tprivate InkPresenter inkPresenter;\n\n\t\tpublic SignaturePadCanvasView ()\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tpublic SignaturePadCanvasView (NSCoder coder)\n\t\t\t: base (coder)\n\t\t{\n\t\t\tInitialize (/* ? baseProperties: false ? */);\n\t\t}\n\n\t\tprotected SignaturePadCanvasView (IntPtr ptr)\n\t\t\t: base (ptr)\n\t\t{\n\t\t\tInitialize (false);\n\t\t}\n\n\t\tpublic SignaturePadCanvasView (CGRect frame)\n\t\t\t: base (frame)\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tprivate void Initialize (bool baseProperties = true)\n\t\t{\n\t\t\tinkPresenter = new InkPresenter (Bounds)\n\t\t\t{\n\t\t\t\tAutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight,\n\t\t\t};\n\t\t\tinkPresenter.StrokeCompleted += OnStrokeCompleted;\n\t\t\tAddSubview (inkPresenter);\n\n\t\t\tStrokeWidth = ImageConstructionSettings.DefaultStrokeWidth;\n\t\t\tStrokeColor = ImageConstructionSettings.DefaultStrokeColor;\n\t\t}\n\n\t\t[Export (\"StrokeColor\"), Browsable (true)]\n\t\tpublic UIColor StrokeColor\n\t\t{\n\t\t\tget { return inkPresenter.StrokeColor; }\n\t\t\tset\n\t\t\t{\n\t\t\t\tinkPresenter.StrokeColor = value;\n\t\t\t\tforeach (var stroke in inkPresenter.GetStrokes ())\n\t\t\t\t{\n\t\t\t\t\tstroke.Color = value;\n\t\t\t\t}\n\t\t\t\tinkPresenter.SetNeedsDisplay ();\n\t\t\t}\n\t\t}\n\n\t\t[Export (\"StrokeWidth\"), Browsable (true)]\n\t\tpublic float StrokeWidth\n\t\t{\n\t\t\tget { return inkPresenter.StrokeWidth; }\n\t\t\tset\n\t\t\t{\n\t\t\t\tinkPresenter.StrokeWidth = value;\n\t\t\t\tforeach (var stroke in inkPresenter.GetStrokes ())\n\t\t\t\t{\n\t\t\t\t\tstroke.Width = value;\n\t\t\t\t}\n\t\t\t\tinkPresenter.SetNeedsDisplay ();\n\t\t\t}\n\t\t}\n\n\t\tpublic void Clear ()\n\t\t{\n\t\t\tinkPresenter.Clear ();\n\n\t\t\tOnCleared ();\n\t\t}\n\n\t\tprivate UIImage GetImageInternal (CGSize scale, CGRect signatureBounds, CGSize imageSize, float strokeWidth, UIColor strokeColor, UIColor backgroundColor)\n\t\t{\n\t\t\tUIGraphics.BeginImageContextWithOptions (imageSize, false, InkPresenter.ScreenDensity);\n\n\t\t\t// create context and set the desired options\n\t\t\tvar context = UIGraphics.GetCurrentContext ();\n\n\t\t\t// background\n\t\t\tcontext.SetFillColor (backgroundColor.CGColor);\n\t\t\tcontext.FillRect (new CGRect (CGPoint.Empty, imageSize));\n\n\t\t\t// cropping / scaling\n\t\t\tcontext.ScaleCTM (scale.Width, scale.Height);\n\t\t\tcontext.TranslateCTM (-signatureBounds.Left, -signatureBounds.Top);\n\n\t\t\t// strokes\n\t\t\tcontext.SetStrokeColor (strokeColor.CGColor);\n\t\t\tcontext.SetLineWidth (strokeWidth);\n\t\t\tcontext.SetLineCap (CGLineCap.Round);\n\t\t\tcontext.SetLineJoin (CGLineJoin.Round);\n\t\t\tforeach (var path in inkPresenter.GetStrokes ())\n\t\t\t{\n\t\t\t\tcontext.AddPath (path.Path.CGPath);\n\t\t\t}\n\t\t\tcontext.StrokePath ();\n\n\t\t\t// get the image\n\t\t\tvar image = UIGraphics.GetImageFromCurrentImageContext ();\n\n\t\t\tUIGraphics.EndImageContext ();\n\n\t\t\treturn image;\n\t\t}\n\n\t\tprivate Task<Stream> GetImageStreamInternal (SignatureImageFormat format, CGSize scale, CGRect signatureBounds, CGSize imageSize, float strokeWidth, UIColor strokeColor, UIColor backgroundColor)\n\t\t{\n\t\t\tvar image = GetImageInternal (scale, signatureBounds, imageSize, strokeWidth, strokeColor, backgroundColor);\n\t\t\tif (image != null)\n\t\t\t{\n\t\t\t\tif (format == SignatureImageFormat.Jpeg)\n\t\t\t\t{\n\t\t\t\t\treturn Task.Run (() => image.AsJPEG ().AsStream ());\n\t\t\t\t}\n\t\t\t\telse if (format == SignatureImageFormat.Png)\n\t\t\t\t{\n\t\t\t\t\treturn Task.Run (() => image.AsPNG ().AsStream ());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Task.FromResult<Stream> (null);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.iOS/SignaturePadView.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing CoreGraphics;\nusing Foundation;\nusing UIKit;\n\nnamespace Xamarin.Controls\n{\n\t[Register (\"SignaturePadView\")]\n\t[DesignTimeVisible (true)]\n\tpublic partial class SignaturePadView : UIView\n\t{\n\t\tprivate UIEdgeInsets padding;\n\n\t\tpublic SignaturePadView ()\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tpublic SignaturePadView (NSCoder coder)\n\t\t\t: base (coder)\n\t\t{\n\t\t\tInitialize (/* ? baseProperties: false ? */);\n\t\t}\n\n\t\tpublic SignaturePadView (IntPtr ptr)\n\t\t\t: base (ptr)\n\t\t{\n\t\t\tInitialize (false);\n\t\t}\n\n\t\tpublic SignaturePadView (CGRect frame)\n\t\t\t: base (frame)\n\t\t{\n\t\t\tInitialize ();\n\t\t}\n\n\t\tprivate void Initialize (bool baseProperties = true)\n\t\t{\n\t\t\t// add the background view\n\t\t\t{\n\t\t\t\tBackgroundImageView = new UIImageView ();\n\t\t\t\tAddSubview (BackgroundImageView);\n\t\t\t}\n\n\t\t\t// add the main signature view\n\t\t\t{\n\t\t\t\tSignaturePadCanvas = new SignaturePadCanvasView ();\n\t\t\t\tSignaturePadCanvas.StrokeCompleted += delegate\n\t\t\t\t{\n\t\t\t\t\tOnSignatureStrokeCompleted ();\n\t\t\t\t};\n\t\t\t\tSignaturePadCanvas.Cleared += delegate\n\t\t\t\t{\n\t\t\t\t\tOnSignatureCleared ();\n\t\t\t\t};\n\t\t\t\tAddSubview (SignaturePadCanvas);\n\t\t\t}\n\n\t\t\t// add the caption\n\t\t\t{\n\t\t\t\tCaption = new UILabel ()\n\t\t\t\t{\n\t\t\t\t\tBackgroundColor = UIColor.Clear,\n\t\t\t\t\tTextAlignment = UITextAlignment.Center,\n\t\t\t\t\tFont = UIFont.SystemFontOfSize (DefaultFontSize),\n\t\t\t\t\tText = DefaultCaptionText,\n\t\t\t\t\tTextColor = SignaturePadDarkColor,\n\t\t\t\t};\n\t\t\t\tAddSubview (Caption);\n\t\t\t}\n\n\t\t\t// add the signature line\n\t\t\t{\n\t\t\t\tSignatureLine = new UIView ()\n\t\t\t\t{\n\t\t\t\t\tBackgroundColor = SignaturePadDarkColor,\n\t\t\t\t};\n\t\t\t\tSignatureLineWidth = DefaultLineThickness;\n\t\t\t\tSignatureLineSpacing = DefaultNarrowSpacing;\n\t\t\t\tAddSubview (SignatureLine);\n\t\t\t}\n\n\t\t\t// add the prompt\n\t\t\t{\n\t\t\t\tSignaturePrompt = new UILabel ()\n\t\t\t\t{\n\t\t\t\t\tBackgroundColor = UIColor.Clear,\n\t\t\t\t\tFont = UIFont.BoldSystemFontOfSize (DefaultFontSize),\n\t\t\t\t\tText = DefaultPromptText,\n\t\t\t\t\tTextColor = SignaturePadDarkColor,\n\t\t\t\t};\n\t\t\t\tAddSubview (SignaturePrompt);\n\t\t\t}\n\n\t\t\t// add the clear label\n\t\t\t{\n\t\t\t\tClearLabel = UIButton.FromType (UIButtonType.Custom);\n\t\t\t\tClearLabel.BackgroundColor = UIColor.Clear;\n\t\t\t\tClearLabel.Font = UIFont.BoldSystemFontOfSize (DefaultFontSize);\n\t\t\t\tClearLabel.SetTitle (DefaultClearLabelText, UIControlState.Normal);\n\t\t\t\tClearLabel.SetTitleColor (SignaturePadDarkColor, UIControlState.Normal);\n\t\t\t\tAddSubview (ClearLabel);\n\n\t\t\t\t// attach the \"clear\" command\n\t\t\t\tClearLabel.TouchUpInside += delegate\n\t\t\t\t{\n\t\t\t\t\tOnClearTapped ();\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tPadding = new UIEdgeInsets (DefaultWideSpacing, DefaultWideSpacing, DefaultNarrowSpacing, DefaultWideSpacing);\n\n\t\t\t// clear / initialize the view\n\t\t\tUpdateUi ();\n\t\t}\n\n\t\tpublic SignaturePadCanvasView SignaturePadCanvas { get; private set; }\n\n\t\t/// <summary>\n\t\t/// Gets the horizontal line that goes in the lower part of the pad.\n\t\t/// </summary>\n\t\tpublic UIView SignatureLine { get; private set; }\n\n\t\t/// <summary>\n\t\t/// The caption displayed under the signature line.\n\t\t/// </summary>\n\t\tpublic UILabel Caption { get; private set; }\n\n\t\t/// <summary>\n\t\t/// The prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\tpublic UILabel SignaturePrompt { get; private set; }\n\n\t\t/// <summary>\n\t\t/// Gets the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\tpublic UIButton ClearLabel { get; private set; }\n\n\t\t/// <summary>\n\t\t///  Gets the image view that may be used as a watermark or as a texture\n\t\t///  for the signature pad.\n\t\t/// </summary>\n\t\tpublic UIImageView BackgroundImageView { get; private set; }\n\n\t\t[Export (\"StrokeColor\"), Browsable (true)]\n\t\tpublic UIColor StrokeColor\n\t\t{\n\t\t\tget => SignaturePadCanvas.StrokeColor;\n\t\t\tset => SignaturePadCanvas.StrokeColor = value;\n\t\t}\n\n\t\t[Export (\"StrokeWidth\"), Browsable (true)]\n\t\tpublic float StrokeWidth\n\t\t{\n\t\t\tget => SignaturePadCanvas.StrokeWidth;\n\t\t\tset => SignaturePadCanvas.StrokeWidth = value;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the color of the signature line.\n\t\t/// </summary>\n\t\t[Export (\"SignatureLineColor\"), Browsable (true)]\n\t\tpublic UIColor SignatureLineColor\n\t\t{\n\t\t\tget => SignatureLine.BackgroundColor;\n\t\t\tset => SignatureLine.BackgroundColor = value;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the width of the signature line.\n\t\t/// </summary>\n\t\t[Export (\"SignatureLineWidth\"), Browsable (true)]\n\t\tpublic nfloat SignatureLineWidth\n\t\t{\n\t\t\tget => SignatureLine.Bounds.Height;\n\t\t\tset\n\t\t\t{\n\t\t\t\tvar bounds = SignatureLine.Bounds;\n\t\t\t\tbounds.Height = value;\n\t\t\t\tSignatureLine.Bounds = bounds;\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the spacing between the signature line and the caption and prompt.\n\t\t/// </summary>\n\t\t[Export (\"SignatureLineSpacing\"), Browsable (true)]\n\t\tpublic nfloat SignatureLineSpacing\n\t\t{\n\t\t\tget => SignatureLine.LayoutMargins.Bottom;\n\t\t\tset\n\t\t\t{\n\t\t\t\tvar margins = SignatureLine.LayoutMargins;\n\t\t\t\tmargins.Top = value;\n\t\t\t\tmargins.Bottom = value;\n\t\t\t\tSignatureLine.LayoutMargins = margins;\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text for the caption displayed under the signature line.\n\t\t/// </summary>\n\t\t[Export (\"CaptionText\"), Browsable (true)]\n\t\tpublic string CaptionText\n\t\t{\n\t\t\tget => Caption.Text;\n\t\t\tset\n\t\t\t{\n\t\t\t\tCaption.Text = value;\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the font size text for the caption displayed under the signature line.\n\t\t/// </summary>\n\t\t[Export (\"CaptionFontSize\"), Browsable (true)]\n\t\tpublic nfloat CaptionFontSize\n\t\t{\n\t\t\tget => Caption.Font.PointSize;\n\t\t\tset\n\t\t\t{\n\t\t\t\tCaption.Font = Caption.Font.WithSize (value);\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text color for the caption displayed under the signature line.\n\t\t/// </summary>\n\t\t[Export (\"CaptionTextColor\"), Browsable (true)]\n\t\tpublic UIColor CaptionTextColor\n\t\t{\n\t\t\tget => Caption.TextColor;\n\t\t\tset => Caption.TextColor = value;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text for the prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\t[Export (\"SignaturePromptText\"), Browsable (true)]\n\t\tpublic string SignaturePromptText\n\t\t{\n\t\t\tget => SignaturePrompt.Text;\n\t\t\tset\n\t\t\t{\n\t\t\t\tSignaturePrompt.Text = value;\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the font size the prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\t[Export (\"SignaturePromptFontSize\"), Browsable (true)]\n\t\tpublic nfloat SignaturePromptFontSize\n\t\t{\n\t\t\tget => SignaturePrompt.Font.PointSize;\n\t\t\tset\n\t\t\t{\n\t\t\t\tSignaturePrompt.Font = SignaturePrompt.Font.WithSize (value);\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text color for the prompt displayed at the beginning of the signature line.\n\t\t/// </summary>\n\t\t[Export (\"SignaturePromptTextColor\"), Browsable (true)]\n\t\tpublic UIColor SignaturePromptTextColor\n\t\t{\n\t\t\tget => SignaturePrompt.TextColor;\n\t\t\tset => SignaturePrompt.TextColor = value;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text for the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\t[Export (\"ClearLabelText\"), Browsable (true)]\n\t\tpublic string ClearLabelText\n\t\t{\n\t\t\tget => ClearLabel.Title (UIControlState.Normal);\n\t\t\tset\n\t\t\t{\n\t\t\t\tClearLabel.SetTitle (value, UIControlState.Normal);\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the font size the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\t[Export (\"ClearLabelFontSize\"), Browsable (true)]\n\t\tpublic nfloat ClearLabelFontSize\n\t\t{\n\t\t\tget => ClearLabel.Font.PointSize;\n\t\t\tset\n\t\t\t{\n\t\t\t\tClearLabel.Font = ClearLabel.Font.WithSize (value);\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets or sets the text color for the label that clears the pad when clicked.\n\t\t/// </summary>\n\t\t[Export (\"ClearLabelTextColor\"), Browsable (true)]\n\t\tpublic UIColor ClearLabelTextColor\n\t\t{\n\t\t\tget => ClearLabel.TitleColor (UIControlState.Normal);\n\t\t\tset => ClearLabel.SetTitleColor (value, UIControlState.Normal);\n\t\t}\n\n\t\t[Export (\"BackgroundImage\"), Browsable (true)]\n\t\tpublic UIImage BackgroundImage\n\t\t{\n\t\t\tget => BackgroundImageView.Image;\n\t\t\tset => BackgroundImageView.Image = value;\n\t\t}\n\n\t\t[Export (\"BackgroundImageContentMode\"), Browsable (true)]\n\t\tpublic UIViewContentMode BackgroundImageContentMode\n\t\t{\n\t\t\tget => BackgroundImageView.ContentMode;\n\t\t\tset => BackgroundImageView.ContentMode = value;\n\t\t}\n\n\t\t[Export (\"BackgroundImageAlpha\"), Browsable (true)]\n\t\tpublic nfloat BackgroundImageAlpha\n\t\t{\n\t\t\tget => BackgroundImageView.Alpha;\n\t\t\tset => BackgroundImageView.Alpha = value;\n\t\t}\n\n\t\t[Export (\"Padding\"), Browsable (true)]\n\t\tpublic UIEdgeInsets Padding\n\t\t{\n\t\t\tget => padding;\n\t\t\tset\n\t\t\t{\n\t\t\t\tpadding = value;\n\t\t\t\tSetNeedsLayout ();\n\t\t\t}\n\t\t}\n\n\t\tprivate void UpdateUi ()\n\t\t{\n\t\t\tClearLabel.Hidden = IsBlank;\n\t\t}\n\n\t\tpublic override void LayoutSubviews ()\n\t\t{\n\t\t\tvar w = Frame.Width;\n\t\t\tvar h = Frame.Height;\n\t\t\tvar currentY = h;\n\n\t\t\tSignaturePrompt.SizeToFit ();\n\t\t\tClearLabel.SizeToFit ();\n\n\t\t\tvar captionHeight = Caption.SizeThatFits (Caption.Frame.Size).Height;\n\t\t\tvar clearButtonHeight = (int)ClearLabel.Font.LineHeight + 1;\n\n\t\t\tvar rect = new CGRect (0, 0, w, h);\n\t\t\tSignaturePadCanvas.Frame = rect;\n\t\t\tBackgroundImageView.Frame = rect;\n\n\t\t\tcurrentY = currentY - Padding.Bottom - captionHeight;\n\t\t\tCaption.Frame = new CGRect (Padding.Left, currentY, w - Padding.Left - Padding.Right, captionHeight);\n\n\t\t\tcurrentY = currentY - SignatureLine.LayoutMargins.Bottom - SignatureLine.Frame.Height;\n\t\t\tSignatureLine.Frame = new CGRect (Padding.Left, currentY, w - Padding.Left - Padding.Right, SignatureLine.Frame.Height);\n\n\t\t\tcurrentY = currentY - SignatureLine.LayoutMargins.Top - SignaturePrompt.Frame.Height;\n\t\t\tSignaturePrompt.Frame = new CGRect (Padding.Left, currentY, SignaturePrompt.Frame.Width, SignaturePrompt.Frame.Height);\n\n\t\t\tClearLabel.Frame = new CGRect (w - Padding.Right - ClearLabel.Frame.Width, Padding.Top, ClearLabel.Frame.Width, clearButtonHeight);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/SignaturePad.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26730.15\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.iOS\", \"SignaturePad.iOS\\SignaturePad.iOS.csproj\", \"{BEF71536-787B-431F-AC7F-A6469710D11F}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Android\", \"SignaturePad.Android\\SignaturePad.Android.csproj\", \"{F1A16CB9-A759-42C8-8F0B-3C9698A55336}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms\", \"SignaturePad.Forms\\SignaturePad.Forms.csproj\", \"{B2AF970D-D640-451C-95AF-92AF531B8C1E}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.Droid\", \"SignaturePad.Forms.Droid\\SignaturePad.Forms.Droid.csproj\", \"{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.iOS\", \"SignaturePad.Forms.iOS\\SignaturePad.Forms.iOS.csproj\", \"{B12D20AA-0EDF-4903-B385-BB8090848532}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.UWP\", \"SignaturePad.UWP\\SignaturePad.UWP.csproj\", \"{16131FDC-D50B-4EF2-8ECC-661184FF80DB}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"SignaturePad.Forms.UWP\", \"SignaturePad.Forms.UWP\\SignaturePad.Forms.UWP.csproj\", \"{6FC62387-6717-4577-A48B-D15848741F08}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{BEF71536-787B-431F-AC7F-A6469710D11F}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F1A16CB9-A759-42C8-8F0B-3C9698A55336}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B2AF970D-D640-451C-95AF-92AF531B8C1E}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{1D5482F6-AA89-422C-9E34-88A8A1AD8AB6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B12D20AA-0EDF-4903-B385-BB8090848532}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{16131FDC-D50B-4EF2-8ECC-661184FF80DB}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{6FC62387-6717-4577-A48B-D15848741F08}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {151CF82C-49C4-42D5-8023-2684A3D42EF8}\n\tEndGlobalSection\nEndGlobal\n"
  }
]