Private Async Sub openFolderButton_Click(sender As Object, e As RoutedEventArgs) Handles openFolderButton.Click
GridView1.ItemsSource = Nothing
Dim myFolderPicker = New FolderPicker
myFolderPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary
myFolderPicker.FileTypeFilter.Add(".jpg")
myFolderPicker.FileTypeFilter.Add(".png")
myFolder = Await myFolderPicker.PickSingleFolderAsync
myFileCollections = Await myFolder.GetFilesAsync
If myFolder Is Nothing = False Then
ProgressRing1.IsActive = True
ProgressRing1.IsEnabled = True
Dim myImageInfo As New List(Of ImageInfo)
For Each result In myFileCollections
Dim myBmp As New BitmapImage
myBmp.SetSource(Await result.OpenReadAsync)
myImageInfo.Add(New ImageInfo With {.画像名 = myBmp})
Next
GridView1.ItemsSource = myImageInfo
ProgressRing1.IsActive = False
ProgressRing1.IsEnabled = False
Else
ProgressRing1.IsActive = False
ProgressRing1.IsEnabled = False
Exit Sub
End If
End Sub
End Class
Microsoft MVP for Development Platforms - Client App Dev (Oct 2003-Sep 2012)。Microsoft MVP for Development Platforms - Windows Phone Development(Oct 2012-Sep 2013)。Microsoft MVP for Development Platforms - Client Development(Oct 2013-Sep 2014)。Microsoft MVP for Development Platforms-Windows Platform Development (Oct 2014-Sep 2015)。