我在我的 PCL 项目中使用了 Xamarin Control SignaturePad 表单。代码如下:
public class DigitalSignature : ContentPage
{
SignaturePadView sign = new SignaturePadView();
public DigitalSignature()
{
Button btnOk = new Button
{
Text = "Ok",
BackgroundColor = Color.FromHex("#ff6600"),
HorizontalOptions = LayoutOptions.End,
WidthRequest = 100,
HeightRequest = 35,
FontSize = 15
};
btnOk.Clicked += btnOk_Clicked;
sign = new SignaturePadView()
{
SignatureLineColor = Color.Red,
StrokeColor = Color.Black,
StrokeWidth = 10f,
HeightRequest = 150,
BackgroundColor = Color.White,
ClearText = "Clear Me"
};
sign.CaptionText = "pls sign here";
Content = new StackLayout
{
Children = {
sign,
btnOk
}
};
}
private void btnOk_Clicked(object sender, EventArgs e)
{
}
}
如何将签名作为图像获取并存储在数据库(MSSQL)中?在 signaturepadview 中没有 getImage() 函数。任何人都知道我该怎么做?
谢谢