Guest User

Untitled

a guest
Dec 18th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. FileOpenPicker openPicker = new FileOpenPicker();
  2. openPicker.ViewMode = PickerViewMode.Thumbnail;
  3. openPicker.SuggestedStartLocation = PickerLocationId.Desktop;
  4. openPicker.FileTypeFilter.Add(".xml");
  5.  
  6. StorageFile file = await openPicker.PickSingleFileAsync();
  7.  
  8.  
  9. if(file!=null)
  10. {
  11. var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
  12.  
  13. }
  14. else
  15. {
  16. //
  17. }
Add Comment
Please, Sign In to add comment