private async void btnGetImg_Click(object sender, RoutedEventArgs e) { var picker = new Windows.Storage.Pickers.FileOpenPicker(); picker.ViewMode = Windows.Storage.Pickers.PickerViewMode.Thumbnail; picker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.PicturesLibrary; picker.FileTypeFilter.Add(".jpg"); picker.FileTypeFilter.Add(".jpeg"); picker.FileTypeFilter.Add(".png"); var list = await picker.PickMultipleFilesAsync(); foreach (var item in list) { files.Add(item); } foreach (var item in files) { Imagemul multi = new Imagemul(); multi.name = item.Name; multi.pathname = item.Path; multi.date = item.DateCreated.ToString(); multi.imga = await bitmap(item); lstmul.Add(multi); } lstImg.ItemsSource = lstmul; }
private async void lstImg_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { int a = lstImg.SelectedIndex; Imagemul multi = new Imagemul() { name = lstmul[a].name, pathname = lstmul[a].pathname, date = lstmul[a].date }; txtName.DataContext = multi; txtPath.DataContext = multi; txtDate.DataContext = multi; ImgChild.Source = await bitmap(files[a]); }