FileOpenPickerUI.AllowedFileTypes 屬性

定義

取得使用者可以選擇) (副檔名的檔案類型清單。

public:
 property IVectorView<Platform::String ^> ^ AllowedFileTypes { IVectorView<Platform::String ^> ^ get(); };
IVectorView<winrt::hstring> AllowedFileTypes();
public IReadOnlyList<string> AllowedFileTypes { get; }
var iVectorView = fileOpenPickerUI.allowedFileTypes;
Public ReadOnly Property AllowedFileTypes As IReadOnlyList(Of String)

屬性值

IVectorView<String>

IReadOnlyList<String>

IVectorView<Platform::String>

IVectorView<winrt::hstring>

允許的檔案類型清單。

備註

因為呼叫檔案選擇器的應用程式 (呼叫應用程式) 可以限制使用者可以選擇的檔案類型,所以提供檔案的應用程式 (提供應用程式) 可以使用此方法來判斷允許的檔案類型。 例如,如果呼叫的應用程式指定只能選擇圖片檔案類型,就無法將音樂檔案新增至所選檔案的檔案選擇器清單。

適用於

另請參閱