0

无法使其正常工作-我一定遗漏了一些东西:

signaturePad2.BackgroundImageView = new ImageView(Context)
{
   Id = GenerateId(this),
   LayoutParameters = new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent)
};

signaturePad2.AddView(BackgroundImageView);
signaturePad2.BackgroundImage = MyGlobals.FileNameOfPhotoTaken;
4

1 回答 1

1

BackgroundImage是类型ImageSource

padView.BackgroundImage = ImageSource.FromUri(new Uri(
    "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Xamarin-logo.svg/220px-Xamarin-logo.svg.png"));
于 2018-04-09T18:15:59.760 回答