DataPackagePropertySet.FileTypes DataPackagePropertySet.FileTypes DataPackagePropertySet.FileTypes DataPackagePropertySet.FileTypes DataPackagePropertySet.FileTypes Property

Definition

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

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

Property Value

IList<string> IList<string> IList<string>

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.