我尝试选择多个图像(来自任何文件夹)并在图像框中显示它们。我必须使用IReadOnlyStream<>和foreach循环但如何? 我的代码的逻辑是
`FileOpenPicker fileOpenPicker = new FileOpenPicker();
private async void button_Click(object sender, RoutedEventArgs e)
{
fileOpenPicker.SuggestedStartLocation = PickerLocationId.Desktop;
fileOpenPicker.ViewMode = PickerViewMode.Thumbnail;
fileOpenPicker.FileTypeFilter.Add(".png");
fileOpenPicker.FileTypeFilter.Add(".jpg");
fileOpenPicker.FileTypeFilter.Add(".jpeg");
fileOpenPicker.FileTypeFilter.Add(".bmp");
StorageFile file = await fileOpenPicker.PickSingleMultipleAsync();
if(file != null)
{
textBlock.Text = file.Name;
IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.ReadWrite);
BitmapImage bmp = new BitmapImage();
bmp.SetSource(fileStream);
image1.Source = bmp;
}