2012-09-24 119 views

回答

1

你會做這樣的事情:

FileOpenPicker openPicker = new FileOpenPicker(); 
openPicker.ViewMode = PickerViewMode.Thumbnail; 
openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; 
openPicker.FileTypeFilter.Add(".jpg"); 
openPicker.FileTypeFilter.Add(".jpeg"); 
openPicker.FileTypeFilter.Add(".png"); 

StorageFile file = await openPicker.PickSingleFileAsync(); 
if (file != null) 
{ 
    await file.CopyAsync(Windows.Storage.ApplicationData.Current.LocalFolder); 
} 
相關問題