Dela via


DataPackagePropertySet.FileTypes Property

Definition

Specifies a vector object that contains the types of files stored in the DataPackage object.

public:
 property IVector<Platform::String ^> ^ FileTypes { IVector<Platform::String ^> ^ get(); };
IVector<winrt::hstring> FileTypes();
public IList<string> FileTypes { get; }
var iVector = dataPackagePropertySet.fileTypes;
Public ReadOnly Property FileTypes As IList(Of String)

Property Value

IVector<String>

IList<String>

IVector<Platform::String>

IVector<winrt::hstring>

Contains the types of files stored in the DataPackage object.

Remarks

Many target apps accept a number of different file formats. Even so, they might prefer one format over another. By adding the file types supported in a DataPackage to the FileTypes property, you can help those target apps select the most appropriate file format for a given operation.

If your app shares content using one of the formats that the DataPackage object supports directly, such as text or Html, you should use the StandardDataFormats class when adding file types to this property. If your app supports a custom data format, you can add that format using a string. In cases where your app uses a delegate to add content to the DataPackage, you must ensure that the string you use in the FileTypes property matches the value of the formatId parameter of the SetDataProvider method.

Applies to