xamarin / SignaturePad

MIT License
245 stars 150 forks source link

Signature pad isn't loading saved strokes #177

Open DannyTimms opened 4 years ago

DannyTimms commented 4 years ago

Description

signature pad isn't loading strokes. It used to work exactly how its coded when I first added it to the project, then all of a sudden it just doesn't seem to load anything. the strokes exist & are not null or anything.

Code

parentsSignature.Strokes = docWrapper.ParentSignature;

Expected Behavior

Signature pad loads the data and makes it visible to the user.

Actual Behavior

blank signature pad.

Basic Information

Screenshots

Reproduction Link

breenbob commented 4 years ago

I was able to get this working for me using the effect technique described here to get view life cycle events on views. I added an instance of this effect to my SignaturePadView control, then set the Strokes property of the signature pad control inside the Loaded event to my saved JSON data (IEnumerable<IEnumerable>). Don't forget to unsubscribe to this event if adding programmatically instead of in Xaml.