User Tools

Site Tools


notes:uwp:pickers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notes:uwp:pickers [2018/01/18]
leszek [Pickers in UWP]
notes:uwp:pickers [2018/01/18]
leszek [FileSavePicker]
Line 21: Line 21:
 var picker = new FileOpenPicker();​ var picker = new FileOpenPicker();​
  
-// Add at least one file type to the FileTypeFilter collection. These file types cannot include wildcards.+// Add at least one file type to the FileTypeFilter collection.
 picker.FileTypeFilter.Add("​.txt"​);​ picker.FileTypeFilter.Add("​.txt"​);​
  
Line 48: Line 48:
 picker.FileTypeFilter.Add("​.bmp"​);​ picker.FileTypeFilter.Add("​.bmp"​);​
  
-picker.ViewMode = PickerViewMode.Thumbnail;​+picker.ViewMode = PickerViewMode.Thumbnail; ​// an optional setting
 picker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;​ picker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;​
  
Line 66: Line 66:
  
 ====FileSavePicker==== ====FileSavePicker====
 +
 +Properties specific to //​FileSavePicker//:​
 +
 +  * FileTypeChoices
 +  * SuggestedFileName
 +  * SuggestedSaveFile
 +  * DefaultFileExtension
  
 Example: Prompt the user for a file: Example: Prompt the user for a file:
notes/uwp/pickers.txt ยท Last modified: 2018/01/18 by leszek