FileSavePicker.FileTypeChoices | fileTypeChoices property

0 out of 2 rated this helpful - Rate this topic

Gets the collection of valid file types that the user can choose to assign to a file.

Syntax


var fileTypeChoices = fileSavePicker.fileTypeChoices;

Property value

Type: IMap<String, IVector> [JavaScript/C++] | System.Collections.Generic.IDictionary<String, IVector> [.NET]

A filePickerFileTypesOrderedMap object that contains a collection of valid file types (extensions) that the user can use to save a file. Each element in this collection maps a display name to a corresponding collection of file name extensions.

Examples

The File picker sample demonstrates how to add file type choices with a display name.


// Create the picker object and set options
var savePicker = new Windows.Storage.Pickers.FileSavePicker();
savePicker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.documentsLibrary;
// Dropdown of file types the user can save the file as
savePicker.fileTypeChoices.insert("Plain Text", [".txt"]);
// Default file name if the user does not type one in or select a file to replace
savePicker.suggestedFileName = "New Document";


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.Storage.Pickers
Windows::Storage::Pickers [C++]

Metadata

Windows.winmd

See also

File picker sample
FileSavePicker class

 

 

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.