0
votes

Can someone please guide me on how to use a signature pad on xamarin FORMS.

I have tried resources available online, but the dont work in my project.

 <?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:acr="clr-namespace:Acr.XamForms.SignaturePad;assembly=Acr.XamForms.SignaturePad" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Checkin.Signature">
<ContentPage.Content>
<ScrollView>
    <StackLayout>
        <acr:SignaturePadView
            x:Name="padView"
            HeightRequest="320"
            WidthRequest="240"

            BackgroundColor="White"
            CaptionText="Caption This"
            CaptionTextColor="Black"
            ClearText="Clear Me!"
            ClearTextColor="Red"
            PromptText="Prompt Here"
            PromptTextColor="Red"
            SignatureLineColor="Aqua"
            StrokeColor="Black"
            StrokeWidth="2"
        />
    </StackLayout>
</ScrollView>
</ContentPage.Content>

Above is one of the codes I have used. A signature pad appears but doesent display anything when I draw on top of it.

This is how the Red Signature pad appears enter image description here

2
See the code i have added - anslem arnolda
First thing I would try is removing the ScrollView. Simplify the problem - AllDayer
Done, Still the same issue. Even though i draw anything on it, nothing writes :( - anslem arnolda
Can you see the signature pad? If you set the background color to red do you see a red box? Can you see the clear text and other options? - AllDayer
I made the background red. I see the red box, but no, i dont see any clear text or any other option. what could the issue be? I have added a screenshot of it - anslem arnolda

2 Answers

0
votes

try to install it on droid project too. that works for me

0
votes

In the AppDelegate, paste the following code:

public static Type dummyt = typeof(SignaturePad.Forms.iOS.SignaturePadRenderer);

As shown below:

public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        public static Type dummyt = typeof(SignaturePad.Forms.iOS.SignaturePadRenderer);
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {

The problem apparently is that some DLLs are not