大江东去fff
大江东去fff

Reputation: 43

How can FileOpenPicker pick file without extension?

The picker requires specific file type, and the pickerUI just display those type file:

        FileOpenPicker fileOpenPicker = new FileOpenPicker();

        fileOpenPicker.FileTypeFilter.Add(".txt");

But now I have two stages to use the FileOpenPicker in different ways:

  1. View the file without extension , and pick it

  2. View all files , not only the required files, and pick it

I tried these code :

        fileOpenPicker.FileTypeFilter.Add("");

        fileOpenPicker.FileTypeFilter.Add(".");

        fileOpenPicker.FileTypeFilter.Add(".*");

It doesn't work

How can I do that?

Upvotes: 0

Views: 154

Answers (1)

Roy Li - MSFT
Roy Li - MSFT

Reputation: 8681

You could try to use the following code:

fileOpenPicker.FileTypeFilter.Add("*");

This will not set the file type when you use the file picker

Upvotes: 2

Related Questions