FileOpenPicker.FileTypeFilter | fileTypeFilter property

Applies to Windows and Windows Phone

Gets the collection of file types that the file open picker displays.

Syntax


public IList<string> FileTypeFilter { get; }

Property value

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

A fileExtensionVector object that contains a collection of file types (file name extensions) , such as ".doc" and ".png". File name extensions are stored in this array as string objects.

Examples

The File picker sample demonstrates how to specify the file types that the user can see and pick from in the file picker.


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


The File picker sample demonstrates how to show files of any type in the file picker for the user to pick from.


FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.List;
openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
openPicker.FileTypeFilter.Add("*");


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

File picker sample
Quickstart: Accessing files with file pickers
fileOpenPicker class
fileExtensionVector class

 

 

Show:
© 2014 Microsoft