WriteableBitmap _writeBitmap;
public async void ContinueFileOpenPicker(FileOpenPickerContinuationEventArgsargs)
{
IRandomAccessStream fileStream;
BitmapImage bitmapImage = new BitmapImage();
if ((args.ContinuationData["Operation"] as string) == "Image" && args.Files != null && args.Files.Count > 0)
{
StorageFile file = args.Files[0];
fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
bitmapImage.SetSource(fileStream);
_writeBitmap = new WriteableBitmap(bitmapImage);
img.Source = bitmapImage;
}
}
红色的报错: “Windows.UI.Xaml.Media.Imaging.WriteableBitmap”不包含采用“1”个参数的构造函数