Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

signature pad (acr xamarin forms version)

$
0
0

Hi all,

i am using the signature pad component from acr xamarin forms and i noticed a problem. If i rotate the screen and then call the signature pad function then it only shows a semi black screen and the actual signature part isn't visible (or of screen). So this only occurs if i rotate the screen. If i startup in portrait or landscape mode and then call the signature pad everything is ok. The code i use is :

var signature = DependencyService.Get<ISignatureService>();

            signature.Request(result =>
            {
                if (result.Cancelled)
                    return;
                else
                {
                    if (_Item.InspectionReport_Employee_Signature == null)
                        _Item.InspectionReport_Employee_Signature = new byte[0];

                    var stream = new MemoryStream();
                    result.Stream.CopyTo(stream);
                    _Item.InspectionReport_Employee_Signature = stream.ToArray();

                    try
                    {
                        stream.Position = 0;
                        imgEmployeeSignature.Source = ImageSource.FromStream(() => stream);
                    }
                    catch (Exception ex)
                    {
                        System.Diagnostics.Debug.WriteLine(ex.Message);
                    }

                    _Item.InspectionReport_Employee_SignaturePoints = result.Points;
                }
            });

Regards,

Per


Viewing all articles
Browse latest Browse all 58056

Trending Articles