This is a fork from https://github.com/aritchie/acrmvvmcross that has a working ios sample and MVVMCross upgraded to 4.3
Call for a signature pad dialog in 1 line of xplat code from a view model!
signatureService.RequestSignature(result => {
if (result.Cancelled)
return;
// use the image stream to write to file or serialize the draw points
// result.Stream or result.Points
});
signatureService.LoadSignature(drawPoints);
##Configuration
signatureService.DefaultConfiguration.ClearText = "Why clear?";
or pass overridden configuration to each method:
signatureService.RequestSignature(callback, new SignaturePadConfiguration {
SaveText = "Signed!",
CancelText = "No way!",
PromptText = "Right here"
});
-
Draw signature
-
Save as image
-
Save as points
-
Add background image to signature pad
- Xamarin (iOS Unified/Android)
- Portable Class Libraries (Profile 259)
Creat a SignaturePadPluginBootstrap class inside Bootstrap folder
public class SignaturePadPluginBootstrap
: MvxLoaderPluginBootstrapAction<Acr.MvvmCross.Plugins.SignaturePad.PluginLoader, Acr.MvvmCross.Plugins.SignaturePad.Touch.Plugin>
{
}
In your App class, override the LoadPlugins method to include
public override void LoadPlugins(IMvxPluginManager pluginManager) {
base.LoadPlugins(pluginManager);
pluginManager.EnsurePlatformAdaptionLoaded<Acr.MvvmCross.Plugins.SignaturePad.PluginLoader>();
}